Add a message to a ticket

POST/v2/helpdesk/tickets/{ticketId}/messages

Send a reply to the customer or add a private internal note to a Helpdesk ticket from your own system.

Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.

Adds a message to a ticket. Call it to answer a customer from your own tool, or to leave a note for your team, for example the result of a check in your order system.

Warning: A message with internal set to false is sent to the customer on the channel of the ticket at once. Check the ticket ID before you run this in a loop, and use internal: true for notes.

Request

POST /v2/helpdesk/tickets/{ticketId}/messages

Path parameters:

Name Type Required Description
ticketId string Yes The ID of the ticket, starting with tkt_.

Body fields:

Name Type Required Description
content string Yes The text of the message.
internal boolean No true adds a private note that only your team sees. Defaults to false, a reply to the customer.
authorId string No A workspace member, starting with usr_, to show as the author. Without it the message is shown as sent by the API.

A reply on a ticket that came in by email goes out as an email. A reply on a WhatsApp or chat ticket goes out on that channel. The ticket status does not change when you add a message. Change it with Update a ticket.

Example request

curl -X POST https://api.askocto.co/v2/helpdesk/tickets/tkt_4m8x2q/messages \
  -H "Authorization: Bearer $OCTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "We are sending a replacement today. You will get a tracking link by email.",
    "authorId": "usr_6k9d2r"
  }'
const response = await fetch(
  "https://api.askocto.co/v2/helpdesk/tickets/tkt_4m8x2q/messages",
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.OCTO_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      content: "We are sending a replacement today. You will get a tracking link by email.",
      authorId: "usr_6k9d2r",
    }),
  },
)

const message = await response.json()
console.log(message.id, message.internal)

Example response

A successful call returns 201 Created with the new message.

{
  "id": "msg_6y3p8r",
  "ticketId": "tkt_4m8x2q",
  "internal": false,
  "author": { "type": "member", "id": "usr_6k9d2r", "name": "Omar Haddad" },
  "content": "We are sending a replacement today. You will get a tracking link by email.",
  "createdAt": "2026-03-20T14:12:00Z"
}

Response fields

The response is a ticket message object, described in the Helpdesk overview. The ticket gets a new updatedAt, and a ticket.updated webhook is sent. To read the whole thread, use List ticket messages.

Errors

Status Code When
400 invalid_request content is missing or empty, or internal is not a boolean.
401 unauthorized The API key is missing, malformed or deleted.
404 not_found The ticket or the member in authorId does not exist in your workspace.
409 conflict The ticket was merged into another ticket. Add the message to the ticket it was merged into.
429 rate_limited Too many requests. Wait for the number of seconds in the Retry-After header.

Something unclear or missing? Tell us and we will fix the page.