support_message_create
Post a message into a support thread.
Post a message into a support thread. A message has exactly one author: either an opaque external identifier from the client's own user base, or a support agent — never both and never neither. Direction, authorship and visibility are independent: an internal note may be inbound or outbound. Posting a message moves the parent thread's last reply timestamp. A message may carry files: create and finalize them first, then name them in attachmentIds. Through the public edge an agent author is accepted only if that agent carries no Lessly binding — a bot or the calling backend; an agent bound to a Lessly identity may author only from a signed-in session
Behavior
- HTTP
POST /support/messages
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| body | string | • | The message text, stored verbatim |
| threadId | string | • | Id of the thread this message belongs to |
| direction | string | • | inbound: written by the external end user. outbound: written by support, going out to them |
| visibility | string | — | Defaults to public when omitted. Internal notes are never shown to the end user |
| attachmentIds | array | — | Files this message carries, created with support_attachment_create and confirmed with support_attachment_finalize beforehand. Each must be an uploaded attachment of the same thread that no other message already carries; otherwise the whole message is refused. At most 10 per message |
| authorAgentId | string | — | The support agent of this product who wrote the message. Set this exactly when the message comes from inside the support contour; leave authorExternalId empty. An agent of another product is reported as not found |
| authorExternalId | string | — | Opaque identifier of the external end user in the client's own user base, stored verbatim. Set this exactly when the message comes from outside; leave authorAgentId empty |
Response
| Field | Type | Always | Description |
|---|---|---|---|
| id | string | • | Message id |
| body | string | • | The message text, byte-identical to what was stored |
| threadId | string | • | Thread this message belongs to |
| createdAt | string | • | ISO-8601 creation timestamp |
| direction | string | • | inbound: written by the external end user. outbound: written by support, going out to them |
| visibility | string | • | public: part of the conversation the external end user sees. internal: a note between agents that never leaves the support contour |
| attachments | array | • | Files this message carries, each with a freshly signed download URL. Empty when there are none. Attachments whose upload was never confirmed are never listed here |
| authorAgentId | string | • | The agent author, or null when the external end user wrote the message |
| authorExternalId | string | • | The external author, or null when an agent wrote the message |
Try it
Post a message into a support thread.