Skip to main content

Reply to Ticket as Agent

POST 

/api/support/agent/tickets/:ticket/messages

Adds a public reply as an agent, emailed to the requester and CCs. The reply stamps first_responded_at when it is the first agent reply, and the built-in "Assign first responder" automation rule assigns the ticket to the replying agent when it is unassigned (a support admin can change that rule).

Required scope: support:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Request body:

  • body (required, string, max 65000)
  • cc[] (optional, array, max 20 emails) — overrides the ticket's CC list for this reply only; omit it and every CC'd stakeholder gets the reply
  • status (optional, string) — set the ticket's status in the same action (e.g. reply-and-set-waiting). One of: open, in_progress, waiting_on_customer, awaiting_release, resolved, closed
  • attachments[] (optional, array of files, max 10, each up to the account's attachment size limit) — send as multipart/form-data when including files
  • last_seen_message_id (optional, integer, min 0) — the id of the newest message the sender had already read. If a newer message has landed on the ticket since, the send is refused with 409 and latest_message_id names the message that was missed, so a customer is never answered blind. Omit it and the check is skipped — a caller that never sends it is never blocked

The response is the new message; mentions is always empty on a public reply.

Authentication: Bearer token with the support:write scope, or an authenticated session, from a caller with an active support role that can work tickets.

If this ticket was merged into another ticket, the request is refused with a 422 whose merged_into (id, number) names the live ticket — send the action there instead.

Request

Responses

Created

Response Headers
    Content-Type