import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
});
async function main() {
const response = await client.tickets.getTicketById({
ticket_id: 'ACM-001',
});
console.log(response);
}
main();curl -X GET 'https://api.periskope.app/v1/tickets/ACM-001' \
-H 'Authorization: Bearer YOUR_API_KEY'{
"chat": {
"org_id": "00000000-0000-0000-0000-000000000000",
"chat_id": "120363000000000000@g.us",
"members": {
"key": {
"contact_id": "911111111111@c.us",
"chat_id": "120363000000000000@g.us",
"org_id": "00000000-0000-0000-0000-000000000000",
"org_phone": "911111111111@c.us",
"is_admin": false,
"is_super_admin": false,
"contact_name": "Rahul Sharma",
"contact_image": "https://example.com/files/image.png",
"contact_color": "#7D9EF1",
"is_internal": false,
"contact_labels": "vip, billing"
}
},
"is_muted": false,
"chat_name": "Example Corp Support",
"chat_type": "group",
"org_phone": "911111111111@c.us",
"chat_image": "https://example.com/files/image.png",
"created_at": "2026-01-10T08:00:00+00:00",
"chat_labels": "customer, priority",
"invite_link": null,
"group_description": null,
"custom_properties": {
"Region": "EMEA"
},
"freshdesk_metadata": {},
"zohodesk_metadata": {},
"initiated_by": null,
"is_archived": false,
"parent_community_id": null
},
"message": {
"message_id": "false_120363000000000000@g.us_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"chat_id": "120363000000000000@g.us",
"org_phone": "911111111111@c.us",
"timestamp": "2026-01-15T09:28:00+00:00",
"body": "I cannot open my invoices from the portal",
"media_path": "",
"sender_phone": "911111111111",
"sender_name": "Rahul Sharma",
"performed_by": null
},
"ticket": {
"ticket_id": "ACM-001",
"org_id": "00000000-0000-0000-0000-000000000000",
"subject": "Customer cannot access invoices",
"status": "open",
"priority": 2,
"assignee": "user@example.com",
"assigned_by": "",
"raised_by": "api",
"due_date": "2026-02-01 00:00:00+00",
"ticket_labels": "urgent, billing",
"ticket_custom_properties": {
"Workspace": "Example Corp"
},
"quoted_message_id": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"created_at": "2026-01-15T09:30:00.000Z",
"closed_at": null,
"closed_by": null,
"closed_message": null,
"first_assigned_at": null,
"is_deleted": false
},
"attached_messages": [
{
"message_id": "false_120363000000000000@g.us_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"chat_id": "120363000000000000@g.us",
"org_phone": "911111111111@c.us",
"timestamp": "2026-01-15T09:28:00+00:00",
"body": "I cannot open my invoices from the portal",
"media_path": "",
"sender_phone": "911111111111",
"sender_name": "Rahul Sharma",
"performed_by": null
}
]
}{
"code": "UNAUTHORIZED_ERROR",
"message": "Invalid bearer auth token",
"status": 401
}{
"code": "NOT_FOUND_ERROR",
"message": "No ticket matches ticket_id",
"status": 404
}{
"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 Ticket By ID
Looks up a ticket by its ticket_id, together with its chat and the message it was raised from.
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
});
async function main() {
const response = await client.tickets.getTicketById({
ticket_id: 'ACM-001',
});
console.log(response);
}
main();curl -X GET 'https://api.periskope.app/v1/tickets/ACM-001' \
-H 'Authorization: Bearer YOUR_API_KEY'{
"chat": {
"org_id": "00000000-0000-0000-0000-000000000000",
"chat_id": "120363000000000000@g.us",
"members": {
"key": {
"contact_id": "911111111111@c.us",
"chat_id": "120363000000000000@g.us",
"org_id": "00000000-0000-0000-0000-000000000000",
"org_phone": "911111111111@c.us",
"is_admin": false,
"is_super_admin": false,
"contact_name": "Rahul Sharma",
"contact_image": "https://example.com/files/image.png",
"contact_color": "#7D9EF1",
"is_internal": false,
"contact_labels": "vip, billing"
}
},
"is_muted": false,
"chat_name": "Example Corp Support",
"chat_type": "group",
"org_phone": "911111111111@c.us",
"chat_image": "https://example.com/files/image.png",
"created_at": "2026-01-10T08:00:00+00:00",
"chat_labels": "customer, priority",
"invite_link": null,
"group_description": null,
"custom_properties": {
"Region": "EMEA"
},
"freshdesk_metadata": {},
"zohodesk_metadata": {},
"initiated_by": null,
"is_archived": false,
"parent_community_id": null
},
"message": {
"message_id": "false_120363000000000000@g.us_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"chat_id": "120363000000000000@g.us",
"org_phone": "911111111111@c.us",
"timestamp": "2026-01-15T09:28:00+00:00",
"body": "I cannot open my invoices from the portal",
"media_path": "",
"sender_phone": "911111111111",
"sender_name": "Rahul Sharma",
"performed_by": null
},
"ticket": {
"ticket_id": "ACM-001",
"org_id": "00000000-0000-0000-0000-000000000000",
"subject": "Customer cannot access invoices",
"status": "open",
"priority": 2,
"assignee": "user@example.com",
"assigned_by": "",
"raised_by": "api",
"due_date": "2026-02-01 00:00:00+00",
"ticket_labels": "urgent, billing",
"ticket_custom_properties": {
"Workspace": "Example Corp"
},
"quoted_message_id": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"created_at": "2026-01-15T09:30:00.000Z",
"closed_at": null,
"closed_by": null,
"closed_message": null,
"first_assigned_at": null,
"is_deleted": false
},
"attached_messages": [
{
"message_id": "false_120363000000000000@g.us_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"chat_id": "120363000000000000@g.us",
"org_phone": "911111111111@c.us",
"timestamp": "2026-01-15T09:28:00+00:00",
"body": "I cannot open my invoices from the portal",
"media_path": "",
"sender_phone": "911111111111",
"sender_name": "Rahul Sharma",
"performed_by": null
}
]
}{
"code": "UNAUTHORIZED_ERROR",
"message": "Invalid bearer auth token",
"status": 401
}{
"code": "NOT_FOUND_ERROR",
"message": "No ticket matches ticket_id",
"status": 404
}{
"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.
Path Parameters
Unique id of the ticket (e.g. ACM-001) — the ticket_id returned when the ticket was created
1"ACM-001"
Response
The ticket with its chat, quoted message and attached messages
A ticket together with its chat, the message it was raised from and (on GET /tickets/{ticket_id}) the messages attached to it.
The chat the ticket is raised on. null in the rare case the chat record is no longer available.
Show child attributes
Show child attributes
The message the ticket was raised from (quoted_message_id). Always present as an object — every field in it is null when the ticket is not linked to a message.
Show child attributes
Show child attributes
The ticket itself
Show child attributes
Show child attributes
Messages attached to the ticket. Populated only by GET /tickets/{ticket_id} — always an empty array in create and update responses.
Show child attributes
Show child attributes
Was this page helpful?