Skip to content

Appends a message to an existing ticket's conversation.

POST
/v1/integration/tickets/{id}/messages
curl --request POST \
--url https://api.example.com/v1/integration/tickets/1/messages \
--header 'Content-Type: application/json' \
--data '{ "content": "example", "contentHtml": "example", "subject": "example", "attachmentIds": [ "example" ] }'

Send an Idempotency-Key header to make retries safe: the same key returns the original message with 200 and writes nothing.

Two different things answer 409, and they call for opposite reactions. Branch on error.code, never on the message — it is localized and changes with Accept-Language. FD:3001 — this key was already used with DIFFERENT content. Your retry logic is wrong; do not retry, fix the key or the body.FD:3002 — an earlier request with this key is still being processed. Your retry logic is right; retry in a moment and you will get its result with 200.

If the ticket is already completed or cancelled the message continues in a NEW child ticket — the response’s ticketId and trackingKey then name the child and continuedInNewTicket is true. Update your mapping when you see it.

attachmentIds accepts only ids this token uploaded through POST /v1/integration/attachments within the last 24 hours, each usable once. They are spent as soon as this call accepts them, BEFORE the message is written — so if the call then fails for any reason, re-upload the files and send the new ids. Replaying the old ids answers 403, because from here they are already used.

id
required
integer format: int64
/^-?(?:0|[1-9]\d*)$/
Idempotency-Key
string
object
content
string
nullable
contentHtml
string
nullable
subject
string
nullable
attachmentIds
Array
nullable
Examplegenerated
{
"content": "example",
"contentHtml": "example",
"subject": "example",
"attachmentIds": [
"example"
]
}

OK

object
data
One of:
object
id
required
/^-?(?:0|[1-9]\d*)$/
ticketId
required
/^-?(?:0|[1-9]\d*)$/
trackingKey
required
string
createdAt
required
string format: date-time
continuedInNewTicket
required
boolean
parentTicketId
nullable /^-?(?:0|[1-9]\d*)$/
isReplay
required
boolean
success
boolean
error
One of:
object
status
/^-?(?:0|[1-9]\d*)$/
code
string
nullable
details
message
string

Created

object
data
One of:
object
id
required
/^-?(?:0|[1-9]\d*)$/
ticketId
required
/^-?(?:0|[1-9]\d*)$/
trackingKey
required
string
createdAt
required
string format: date-time
continuedInNewTicket
required
boolean
parentTicketId
nullable /^-?(?:0|[1-9]\d*)$/
isReplay
required
boolean
success
boolean
error
One of:
object
status
/^-?(?:0|[1-9]\d*)$/
code
string
nullable
details
message
string

Unauthorized

object
type
string
nullable
title
string
nullable
status
nullable /^-?(?:0|[1-9]\d*)$/
detail
string
nullable
instance
string
nullable

Forbidden

object
type
string
nullable
title
string
nullable
status
nullable /^-?(?:0|[1-9]\d*)$/
detail
string
nullable
instance
string
nullable

Not Found

object
type
string
nullable
title
string
nullable
status
nullable /^-?(?:0|[1-9]\d*)$/
detail
string
nullable
instance
string
nullable

Conflict

object
type
string
nullable
title
string
nullable
status
nullable /^-?(?:0|[1-9]\d*)$/
detail
string
nullable
instance
string
nullable

Unprocessable Entity

object
type
string
nullable
title
string
nullable
status
nullable /^-?(?:0|[1-9]\d*)$/
detail
string
nullable
instance
string
nullable

Too Many Requests

object
type
string
nullable
title
string
nullable
status
nullable /^-?(?:0|[1-9]\d*)$/
detail
string
nullable
instance
string
nullable