Skip to main content

Save Ticket Draft

PUT 

/api/support/agent/tickets/:ticket/draft

Saves the ticket's one shared draft, creating it when the ticket has none. The caller becomes the holder: the draft is team property, and everyone else sees who wrote it last.

Required scope: support:write

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

Path parameters

  • ticket (integer) — the ticket id.

Request body

  • body (required, string, max 65000) — must be present, and may be an empty string
  • mode (optional, string, default reply) — reply (a public reply) or note (an internal note)
  • cc[] (optional, array, max 20, each max 255) — the addresses the reply would copy
  • status_after (optional, string, nullable) — the status to set when the draft is sent. One of: open, in_progress, waiting_on_customer, awaiting_release, resolved, closed
  • attachments[] (optional, array, max 10) — file metadata only, each {name (required, max 255), size (optional integer, min 0)}. The files themselves ride the send, never the draft
  • version (optional, integer, min 0, default 0) — the version the caller last read; 0 (or omitting it) means "I believe this ticket has no draft yet"
  • force (optional, boolean, default false) — take the draft over regardless of version

Concurrency: every successful save increments version by one. A save whose version is behind the stored draft is refused with 409, whose body carries the current draft (including the agent holding it) so the caller can show who has it and offer to take over. force: true is the only way past that check — nothing is discarded on either side, the refused caller keeps its own text and decides.

Sending a reply or an internal note on the ticket clears the draft automatically.

Authentication: Bearer token with the support:write scope, or an authenticated session, from a caller with an active support role (any role, including viewer — a viewer may leave internal notes, so a viewer may write the draft). No tenant context — this endpoint is central.

Request

Responses

OK

Response Headers
    Content-Type