Tickets
Returns the message history for a ticket, ordered for display, along with a meta block describing the contact, labels, and seen timestamps. Results are paginated with the before cursor for loading older messages (infinite-scroll style). Use the embedded ticket messages from GET /ticket/{id} for a quick preview, but use this endpoint to page through the complete history.
curl --request GET \
--url 'https://api.nabrah.ai/api/ext/omni_v2/ticket/<id>/messages' \
--header 'X-API-Key: <your-api-key>'{
"meta": {
"labels": [
"string"
],
"additional_attributes": {},
"contact": {
"additional_attributes": {},
"custom_attributes": {},
"email": "string",
"id": 0,
"identifier": "string",
"name": "string",
"phone_number": "string",
"thumbnail": "string",
"blocked": false,
"type": "string"
},
"agent_last_seen_at": "string",
"assignee_last_seen_at": "string"
},
"payload": [
{
"content": "string",
"content_attributes": {},
"content_type": "string",
"conversation_id": 0,
"created_at": 0,
"echo_id": "string",
"id": 0,
"inbox_id": 0,
"message_type": 0,
"private": false,
"sender": {
"id": 0,
"name": "string",
"type": "string",
"email": "string",
"phone_number": "string"
},
"source_id": "string",
"status": "string"
}
]
}This endpoint pages backwards in time using a message id cursor, not page numbers.
beforePass the numeric id of the oldest message you have already loaded to fetch the page of messages immediately before it. Omit before on the first request to get the most recent page, then repeat with the smallest id from payload until no older messages are returned.
metaConversation-level context: the contact object, applied labels, and agent/assignee last-seen markers.
contactlabelsagent_last_seen_atassignee_last_seen_atEach message includes its content, type, sender, privacy flag, and timestamps. message_type distinguishes incoming vs outgoing/activity messages; private marks internal notes.
idcontentcontent_typemessage_typeprivatesendercreated_atconversation_idX-API-KeystringheaderrequiredYour workspace API key. Create one in the dashboard under API keys.
idintegerrequiredNumeric identifier of the ticket whose messages to list.
From GET /api/ext/omni_v2/ticket or the create-ticket response.
beforeintegerMessage id cursor for fetching older messages.
Optional integer. Set it to the smallest message id from the previous page to load the next-older page. Omit for the most recent page.
Successful Response
application/json
Validation Error
application/json