TypeScript
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
});
async function main() {
const response = await client.tickets.listTickets();
console.log(response);
}
main();curl -X GET 'https://api.periskope.app/v1/tickets' \
-H 'Authorization: Bearer YOUR_API_KEY'{
"from": 1,
"to": 20,
"count": 20,
"tickets": [
{
"ticket_id": "ACM-001",
"org_id": "00000000-0000-0000-0000-000000000000",
"chat_id": "120363000000000000@g.us",
"org_phone": "911111111111@c.us",
"subject": "Customer cannot access invoices",
"status": "open",
"priority": 2,
"assignee": "user@example.com",
"assigned_by": "user@example.com",
"raised_by": "api",
"due_date": "2026-02-01T00:00:00+00:00",
"label_ids": {
"label-aaaaaaaaaaaa": true
},
"labels": [
"urgent",
"billing"
],
"custom_properties": {
"Workspace": "Example Corp"
},
"quoted_message_id": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"created_at": "2026-01-15T09:30:00.000Z",
"last_updated_at": "2026-01-15T09:30:00.000Z",
"last_updated_by": "user@example.com",
"first_assigned_at": "2026-01-15T10:00:00.000Z",
"closed_at": null,
"close_ticket_metadata": {
"closed_by": "user@example.com",
"closed_at": "2026-01-20T17:45:00.000Z",
"closed_message": "Resolved over call",
"send_reply_message_id": null
},
"response_time": null,
"is_deleted": false,
"hubspot_metadata": {},
"freshdesk_metadata": {},
"zohodesk_metadata": {}
}
]
}{
"code": "UNAUTHORIZED_ERROR",
"message": "Invalid bearer auth token",
"status": 401
}{
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"status": 422,
"fields": {
"body.chat_id": {
"message": "chat_id is required"
}
}
}{
"code": "RATE_LIMIT_ERROR",
"message": "You can only make 100 requests per second",
"status": 429
}{
"code": "UNKNOWN_ERROR",
"message": "Internal server error",
"status": 500
}Ticket APIs
Get Tickets
Returns the tickets of the workspace, newest first, excluding deleted tickets.
TypeScript
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
});
async function main() {
const response = await client.tickets.listTickets();
console.log(response);
}
main();curl -X GET 'https://api.periskope.app/v1/tickets' \
-H 'Authorization: Bearer YOUR_API_KEY'{
"from": 1,
"to": 20,
"count": 20,
"tickets": [
{
"ticket_id": "ACM-001",
"org_id": "00000000-0000-0000-0000-000000000000",
"chat_id": "120363000000000000@g.us",
"org_phone": "911111111111@c.us",
"subject": "Customer cannot access invoices",
"status": "open",
"priority": 2,
"assignee": "user@example.com",
"assigned_by": "user@example.com",
"raised_by": "api",
"due_date": "2026-02-01T00:00:00+00:00",
"label_ids": {
"label-aaaaaaaaaaaa": true
},
"labels": [
"urgent",
"billing"
],
"custom_properties": {
"Workspace": "Example Corp"
},
"quoted_message_id": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"created_at": "2026-01-15T09:30:00.000Z",
"last_updated_at": "2026-01-15T09:30:00.000Z",
"last_updated_by": "user@example.com",
"first_assigned_at": "2026-01-15T10:00:00.000Z",
"closed_at": null,
"close_ticket_metadata": {
"closed_by": "user@example.com",
"closed_at": "2026-01-20T17:45:00.000Z",
"closed_message": "Resolved over call",
"send_reply_message_id": null
},
"response_time": null,
"is_deleted": false,
"hubspot_metadata": {},
"freshdesk_metadata": {},
"zohodesk_metadata": {}
}
]
}{
"code": "UNAUTHORIZED_ERROR",
"message": "Invalid bearer auth token",
"status": 401
}{
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"status": 422,
"fields": {
"body.chat_id": {
"message": "chat_id is required"
}
}
}{
"code": "RATE_LIMIT_ERROR",
"message": "You can only make 100 requests per second",
"status": 429
}{
"code": "UNKNOWN_ERROR",
"message": "Internal server error",
"status": 500
}Authorizations
Query Parameters
Response
Paginated list of tickets
Was this page helpful?