POST/v1/messages/{threadId}/messages

Add a message to a thread

Creates a message in an existing thread. Supply body and sender, and use threadId to select the thread; sender identifies whether the message is from an end user, a member, or the system.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 3 body fields
threadIdstringrequired
The unique identifier of the thread to add the message to.

The message content and sender details.

bodystringrequired
The message text.
senderstringrequired
The message sender: `end_user`, `member`, or `system`.
Allowed:end_usermembersystem
localestringoptional
The locale associated with the message.

3 status codes
201Returns the created message in the `data` field.
dataobjectoptional
401Returned when the request is unauthenticated.
errorobjectoptional
404Returned when the thread does not exist.
errorobjectoptional

Error handling

A 401 is returned when the request is unauthenticated. A 404 is returned when the threadId path parameter does not identify an existing thread. body and sender are required, and sender must be end_user, member, or system.