Skip to main content
POST
Send a message from the widget

Authorizations

X-Auth-Token
string
header
required

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

website_token
string
required

The web-widget inbox's public token, as it appears in your widget snippet. Required on every widget request.

Example:

"EXAMPLE_WEBSITE_TOKEN"

Body

application/json
message
object
required

content, plus optional echo_id, reply_to, timestamp and referer_url.

Response

Success

id
number

The ID of the message

content
string | null

The text content of the message

account_id
number

The ID of the account

inbox_id
number

The ID of the inbox

conversation_id
number

The ID of the conversation

message_type
enum<integer>

0 = incoming, 1 = outgoing, 2 = activity, 3 = template.

Available options:
0,
1,
2,
3
created_at
integer

The time at which message was created

updated_at
string<date-time> | null

ISO-8601 timestamp of the last update. Note this differs from created_at on the same object, which is unix epoch seconds.

private
boolean

The flags which shows whether the message is private or not

status
enum<string>

The status of the message

Available options:
sent,
delivered,
read,
failed
source_id
string | null

The source ID of the message

content_type
enum<string>

The type of the template message

Available options:
text,
input_select,
cards,
form
content_attributes
object

The content attributes for each content_type

sender_type
enum<string> | null

The class of the sender, capitalised to match the underlying record type.

Available options:
Contact,
User,
AgentBot
sender_id
number

The ID of the sender

external_source_ids
object

The external source IDs of the message

additional_attributes
object

The additional attributes of the message

processed_message_content
string | null

The processed message content

sentiment
object

The sentiment of the message

conversation
object

The conversation object

attachment
object

The file object attached to the image

sender
object

User/Agent/AgentBot object