Skip to content
QwryAI
Documentation
Pages

Endpoints

List ticket messages

Read a ticket's comments ten at a time, oldest first, including internal notes

A ticket's comments come back with the ticket from the get_ticket_detail tool, ten per call. Start with "offset": 0, then send each response's nextOffset as the next offset until it's null. Comments come oldest first. Internal comments are included and marked isInternal: true.

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, such as TKT-73.
offsetintegerYesThe first comment to return, counting from 0. Use the previous response's nextOffset.

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

The ticket's own fields are the same as in Get a ticket; the comment fields are below.

JSON
{
  "success": true,
  "data": {
    "ticketId": "TKT-73",
    "title": "Late delivery for order 1043",
    "status": "in_progress",
    "description": "My delivery for order 1043 is two weeks late. Please help me resolve this.",
    "descriptionTruncated": false,
    "comments": [
      {
        "id": "c-1",
        "authorType": "agent",
        "timestamp": "2026-11-30T19:02:11.508Z",
        "isInternal": false,
        "content": "Sorry about the wait, Sam. I've asked the courier for an update and will write back today.",
        "truncated": false
      },
      {
        "id": "c-2",
        "authorType": "agent",
        "timestamp": "2026-11-30T19:03:40.112Z",
        "isInternal": true,
        "content": "Courier ticket opened. Refund if not delivered by Friday.",
        "truncated": false
      }
    ],
    "nextOffset": null
  }
}
FieldTypeDescription
comments[].idstringThe comment's id.
comments[].authorTypestringWho wrote it: agent (a team member), user (the customer) or system.
comments[].timestampstringWhen it was written.
comments[].isInternalbooleantrue for an internal note the customer never sees.
comments[].contentstringThe comment's text, up to 1,000 characters.
comments[].truncatedbooleantrue when the comment was longer and was cut.
nextOffsetinteger or nullThe offset for the next ten comments; null after the last one.

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.

See Error Handling for authentication and rate-limit errors.

Explore the documentation