Appends a message to an existing ticket's conversation.
const url = 'https://api.example.com/v1/integration/tickets/1/messages';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"content":"example","contentHtml":"example","subject":"example","attachmentIds":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "content": "example", "contentHtml": "example", "subject": "example", "attachmentIds": [ "example" ]}object
Examplegenerated
{ "content": "example", "contentHtml": "example", "subject": "example", "attachmentIds": [ "example" ]}object
Examplegenerated
{ "content": "example", "contentHtml": "example", "subject": "example", "attachmentIds": [ "example" ]}Responses
Section titled “Responses”OK
object
Examplegenerated
{ "data": { "id": "example", "ticketId": "example", "trackingKey": "example", "createdAt": "2026-04-15T12:00:00Z", "continuedInNewTicket": true, "parentTicketId": "example", "isReplay": true }, "success": true, "error": { "status": "example", "code": "example", "details": "example", "message": "example" }}object
Examplegenerated
{ "data": { "id": "example", "ticketId": "example", "trackingKey": "example", "createdAt": "2026-04-15T12:00:00Z", "continuedInNewTicket": true, "parentTicketId": "example", "isReplay": true }, "success": true, "error": { "status": "example", "code": "example", "details": "example", "message": "example" }}Created
object
Examplegenerated
{ "data": { "id": "example", "ticketId": "example", "trackingKey": "example", "createdAt": "2026-04-15T12:00:00Z", "continuedInNewTicket": true, "parentTicketId": "example", "isReplay": true }, "success": true, "error": { "status": "example", "code": "example", "details": "example", "message": "example" }}object
Examplegenerated
{ "data": { "id": "example", "ticketId": "example", "trackingKey": "example", "createdAt": "2026-04-15T12:00:00Z", "continuedInNewTicket": true, "parentTicketId": "example", "isReplay": true }, "success": true, "error": { "status": "example", "code": "example", "details": "example", "message": "example" }}Unauthorized
object
object
Examplegenerated
{ "type": "example", "title": "example", "status": "example", "detail": "example", "instance": "example"}object
Examplegenerated
{ "type": "example", "title": "example", "status": "example", "detail": "example", "instance": "example"}Forbidden
object
object
Examplegenerated
{ "type": "example", "title": "example", "status": "example", "detail": "example", "instance": "example"}object
Examplegenerated
{ "type": "example", "title": "example", "status": "example", "detail": "example", "instance": "example"}Not Found
object
object
Examplegenerated
{ "type": "example", "title": "example", "status": "example", "detail": "example", "instance": "example"}object
Examplegenerated
{ "type": "example", "title": "example", "status": "example", "detail": "example", "instance": "example"}Conflict
object
object
Examplegenerated
{ "type": "example", "title": "example", "status": "example", "detail": "example", "instance": "example"}object
Examplegenerated
{ "type": "example", "title": "example", "status": "example", "detail": "example", "instance": "example"}Unprocessable Entity
object
object
Examplegenerated
{ "type": "example", "title": "example", "status": "example", "detail": "example", "instance": "example"}object
Examplegenerated
{ "type": "example", "title": "example", "status": "example", "detail": "example", "instance": "example"}Too Many Requests
object
object
Examplegenerated
{ "type": "example", "title": "example", "status": "example", "detail": "example", "instance": "example"}object
Examplegenerated
{ "type": "example", "title": "example", "status": "example", "detail": "example", "instance": "example"}