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
}Get Tickets
Returns the tickets of the workspace, newest first, excluding deleted tickets.
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
Your Periskope API token, sent as Authorization: Bearer <token>. Generate one from the Periskope dashboard under Settings → API & Webhooks. API access requires an active Pro or Enterprise plan.
Query Parameters
Number of records to skip before the first returned record. Use together with limit to paginate: page N is offset = N * limit. Defaults to 0.
x >= 00
Maximum number of tickets to return in one page (up to 2000). Defaults to 1000.
1 <= x <= 20001000
One or more raiser member emails (or "api"), comma-separated.
"user@example.com"
One or more assignee member emails, comma-separated.
"user@example.com"
One or more assigner member emails, comma-separated.
"user@example.com"
One or more statuses, comma-separated: 'open', 'inprogress', 'closed', 'archived'.
"open,inprogress"
One or more priorities, comma-separated: 1 (low) to 4 (urgent).
"3,4"
Only tickets with priority at or above this value (1-4).
1 <= x <= 42
Only tickets with priority at or below this value (1-4).
1 <= x <= 44
One or more labels, comma-separated — label names (matched exactly) or label_ids. Tickets carrying ANY of them match.
"urgent,billing"
Only tickets created at or after this time (ISO 8601).
"2026-01-01T00:00:00Z"
Only tickets created at or before this time (ISO 8601).
"2026-01-31T23:59:00Z"
Only tickets due at or after this time (ISO 8601).
"2026-01-01T00:00:00Z"
Only tickets due at or before this time (ISO 8601).
"2026-01-31T23:59:00Z"
Field to sort by: 'created_at' (default), 'due_date' or 'priority'.
created_at, due_date, priority "priority"
Sort direction: 'asc' or 'desc' (default).
asc, desc "desc"
Case-insensitive substring search on the ticket subject and ticket_id.
"hello"
Response
Paginated list of tickets
1-based index of the first record in this page (offset + 1).
1
1-based index of the last record in this page.
20
Number of records in this page — the length of the tickets array, not the total across all pages.
20
The tickets in this page.
Show child attributes
Show child attributes
Was this page helpful?