Skip to main content

Get ticket conversation

Returns the email conversation for a ticket — every inbound email, agent reply and internal note — newest first.

Pass the ticket's uid (from Get ticket details). Each item's message field is a JSON string; parse it to get the email: sender, toAddresses, ccAddresses, subject, html, latestEmailContent (the new text in that email), emailHistory (the quoted earlier thread) and attachments.

messageType tells you who wrote it: USER (customer email), AGENT (reply sent from Inbox/API), NOTE (internal note — never emailed).

Use limit and offset to page through long threads.

Query Parameters
botId string — REQUIRED

ID of the AI agent (bot).

Example: x1715164928057

uid string — REQUIRED

The ticket's uid (returned by Get ticket details).

source string — REQUIRED

Channel of the conversation. Use email for email tickets.

ticketID integer

Ticket ID, to scope the result to this ticket.

Example: 1024

limit integer

Page size.

Example: 20

offset integer

Number of messages to skip.

Responses
200

Messages (or an error envelope — check success).

Schema — OPTIONAL
success boolean — OPTIONAL
code integer — OPTIONAL
data object[] — OPTIONAL
_id string — OPTIONAL

Message ID. Pass it as inReplyTo when replying to this email.

uid string — OPTIONAL
agentId string — OPTIONAL
messageType string — OPTIONAL

Possible values: [USER, AGENT, NOTE]

message string — OPTIONAL

JSON-encoded email (sender, recipients, subject, html, latestEmailContent, emailHistory, attachments).

source string — OPTIONAL
created date-time — OPTIONAL