List ticket messages
GET/v2/helpdesk/tickets/{ticketId}/messages
Read the thread of one Helpdesk ticket in order, with replies and internal notes, their authors and times, one cursor page at a time.
Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.
Returns the messages of a ticket, oldest first. Call it to show a ticket thread in your own tool, to copy a conversation into another system, or to read the last reply before you answer.
Request
GET /v2/helpdesk/tickets/{ticketId}/messages
Path parameters:
| Name | Type | Required | Description |
|---|---|---|---|
ticketId |
string | Yes | The ID of the ticket, starting with tkt_. |
Query parameters:
| Name | Type | Required | Description |
|---|---|---|---|
limit |
integer | No | Items per page, from 1 to 100. Defaults to 20. |
cursor |
string | No | The nextCursor value from the previous page. |
order |
string | No | asc for oldest first, desc for newest first. Defaults to asc. |
internal |
boolean | No | true returns only internal notes, false only replies. Leave it out to get both. |
Keep order, internal and limit the same on every request of one walk through the thread.
Example request
curl "https://api.askocto.co/v2/helpdesk/tickets/tkt_4m8x2q/messages?limit=50" \
-H "Authorization: Bearer $OCTO_API_KEY"
const url = new URL("https://api.askocto.co/v2/helpdesk/tickets/tkt_4m8x2q/messages")
url.searchParams.set("limit", "50")
const response = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.OCTO_API_KEY}` },
})
const { data } = await response.json()
for (const message of data) {
const kind = message.internal ? "note" : "reply"
console.log(`[${kind}] ${message.author.name}: ${message.content}`)
}
Example response
A successful call returns 200 OK.
{
"data": [
{
"id": "msg_5d9k2w",
"ticketId": "tkt_4m8x2q",
"internal": false,
"author": { "type": "contact", "id": "con_9a3f1k", "name": "Dana Whitfield" },
"content": "The jacket arrived with a torn sleeve. I would like a replacement.",
"createdAt": "2026-03-20T14:05:00Z"
},
{
"id": "msg_8t1n6c",
"ticketId": "tkt_4m8x2q",
"internal": true,
"author": { "type": "agent", "id": "agt_8f3k2m", "name": "Store support" },
"content": "Order A-1042 shipped on March 12. The customer is inside the 30 day window.",
"createdAt": "2026-03-20T14:05:10Z"
},
{
"id": "msg_2h6j9d",
"ticketId": "tkt_4m8x2q",
"internal": false,
"author": { "type": "member", "id": "usr_6k9d2r", "name": "Omar Haddad" },
"content": "We are sending a replacement today.",
"createdAt": "2026-03-20T14:12:00Z"
}
],
"nextCursor": null
}
Response fields
| Name | Type | Description |
|---|---|---|
data[].id |
string | The message ID, starting with msg_. |
data[].ticketId |
string | The ticket the message belongs to. |
data[].internal |
boolean | true for a private note, false for a message the customer can see. |
data[].author |
object | Who wrote it: type (contact, member, agent or api), id and name. |
data[].content |
string | The text of the message. |
data[].createdAt |
string | An ISO 8601 UTC time. |
nextCursor |
string or null | Pass it as cursor for the next page. null on the last page. |
Internal notes are private to your team. Do not forward them to customers. Write a new message with Add a message to a ticket.
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request |
limit is outside 1 to 100, or order or internal has an unknown value. |
| 401 | unauthorized |
The API key is missing, malformed or deleted. |
| 404 | not_found |
No ticket has this ID in your workspace. |
| 429 | rate_limited |
Too many requests. Wait for the number of seconds in the Retry-After header. |
See Pagination for how cursors work.