Send a message from the widget
Posts a message as the visitor, opening a conversation first if none is open. echo_id is your client-side identifier for the message, echoed back so the widget can match its optimistic render to the saved row.
Authorizations
The signed session token from POST /api/v1/widget/config. Sent alongside website_token in the query string on every widget request. See /api-reference/widget-api-authentication.
Query Parameters
The web-widget inbox's public token, as it appears in your widget snippet. Required on every widget request.
"EXAMPLE_WEBSITE_TOKEN"
Body
content, plus optional echo_id, reply_to, timestamp and referer_url.
Response
Success
The ID of the message
The text content of the message
The ID of the account
The ID of the inbox
The ID of the conversation
0 = incoming, 1 = outgoing, 2 = activity, 3 = template.
0, 1, 2, 3 The time at which message was created
ISO-8601 timestamp of the last update. Note this differs from created_at on the same object, which is unix epoch seconds.
The flags which shows whether the message is private or not
The status of the message
sent, delivered, read, failed The source ID of the message
The type of the template message
text, input_select, cards, form The content attributes for each content_type
The class of the sender, capitalised to match the underlying record type.
Contact, User, AgentBot The ID of the sender
The external source IDs of the message
The additional attributes of the message
The processed message content
The sentiment of the message
The conversation object
The file object attached to the image
User/Agent/AgentBot object