Skip to main content

Reply to a ticket

Sends an email reply on an existing ticket's thread (or adds an internal note). The reply is emailed to the customer from the bot's configured support address and is threaded with the previous emails.

message is a JSON-encoded string containing the email (see example). HTML is sanitized before sending.

Side effects: a reply on a PENDING ticket moves it to IN-PROGRESS; an AGENT reply counts towards first-response / SLA metrics.

The API key must hold an Inbox Agent, Inbox Admin, Admin or Super Admin role (otherwise code: 403, access denied).

Query Parameters
botId string — REQUIRED

ID of the AI agent (bot).

Example: x1715164928057

Request Body — REQUIRED
ticketId integer — REQUIRED

Ticket ID to reply on.

uid string — REQUIRED

The ticket's uid (from Get ticket details).

messageType string — REQUIRED

Possible values: [AGENT, NOTE]

AGENT emails the customer; NOTE adds an internal note only.

agentId string

Optional. Username of the agent the reply is sent as (shown as the sender name in the transcript).

inReplyTo string

Optional. _id of the message being replied to (from Get ticket conversation), for threading.

created date-time

Timestamp of the reply (ISO 8601).

message string — REQUIRED

JSON-encoded email object with: sender.address (the bot's support email), toAddresses, optional ccAddresses / bccAddresses (arrays of { "address": "..." }), subject, html (reply body) and optional attachments.

Responses
200

Reply accepted (or an error envelope — check success).

Schema — OPTIONAL
success boolean — OPTIONAL

Present and true on success.

code integer — OPTIONAL

Logical status code (200 on success; 400/401/403/500 on failure).

data — OPTIONAL

Response payload on success.

message string — OPTIONAL

Error message on failure.