Skip to content
QwryAI
Documentation
Pages

Endpoints

Get a ticket

Read one ticket by its number, with its status, assignee, description and first comments

The get_ticket_detail tool returns one ticket of the agent, found by its number such as TKT-73. It includes the ticket's status, priority, assignee and timestamps, the customer's description, and its comments ten at a time. It only reads: it never changes the ticket or replies to the customer.

POSThttps://api.qwryai.com/public/v1/tools/get_ticket_detail

Authentication

Send your API key as Authorization: Bearer YOUR_API_KEY. The key needs Manage conversations and helpdesk. See Authentication.

Body parameters

NameTypeRequiredDescription
chatbotIdstringYesThe agent's id, from list_agents.
ticketIdstringYesThe ticket's number, as shown in Tickets and returned by List tickets, such as TKT-73.
offsetintegerYesWhere its comment list starts. Send 0 for the first ten comments. See List ticket messages.

Request example

Bash
curl -X POST 'https://api.qwryai.com/public/v1/tools/get_ticket_detail' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"chatbotId": "YOUR_AGENT_ID", "ticketId": "TKT-73", "offset": 0}'

Response

JSON
{
  "success": true,
  "data": {
    "_id": "<recordId>",
    "ticketId": "TKT-73",
    "title": "Late delivery for order 1043",
    "status": "open",
    "priority": "medium",
    "category": "general",
    "source": "chat",
    "assignedAgentId": null,
    "assignedAgentName": null,
    "timestamps": {
      "created": "2026-11-30T18:15:02.074Z",
      "updated": "2026-11-30T18:56:55.709Z",
      "assigned": null,
      "resolved": null,
      "closed": null
    },
    "respondedAt": null,
    "createdAt": "2026-11-30T18:15:02.074Z",
    "updatedAt": "2026-11-30T18:56:55.709Z",
    "description": "My delivery for order 1043 is two weeks late. Please help me resolve this.",
    "descriptionTruncated": false,
    "comments": [],
    "nextOffset": null
  }
}
FieldTypeDescription
ticketIdstringThe ticket's number.
titlestringThe ticket's title.
statusstringIts status category: open, in_progress, on_hold, waiting_on_customer, resolved or closed. See List ticket statuses.
priority, categorystringAs set on the ticket.
sourcestringWhere the ticket started, such as chat, email or whatsapp.
assignedAgentId, assignedAgentNamestring or nullThe team member it's assigned to, or null.
timestampsobjectWhen the ticket was created, last updated, assigned, resolved and closed.
respondedAtstring or nullThe response time recorded on the ticket, or null.
descriptionstringThe ticket's description, up to 2,000 characters.
descriptionTruncatedbooleantrue when the description was longer and was cut.
commentsarrayUp to ten comments from offset.
nextOffsetinteger or nullSend it as offset to read the next comments; null when there are none.

Errors

HTTP statuscodeWhen
400INVALID_ARGUMENTSticketId or offset is missing, or offset isn't a whole number from 0.
400CHATBOT_ID_REQUIREDchatbotId is missing or isn't a valid agent id.
403INSUFFICIENT_PERMISSIONThe key doesn't hold Manage conversations and helpdesk.
404CHATBOT_NOT_FOUNDNo agent with that chatbotId in your workspace.
500TOOL_FAILEDNo ticket with that number belongs to this agent, or the read failed. Check the number with Search tickets.

See Error Handling for authentication and rate-limit errors.

Explore the documentation