Skip to main content
POST
Send a reply

Authorizations

Authorization
string
header
required

A project API key, created in the dashboard.

Headers

Idempotency-Key
string

A unique key that makes the request safe to retry, such as a V4 UUID. 1 to 255 printable ASCII characters.

Required string length: 1 - 255

Path Parameters

conversation
string
required

ID of the conversation.

Body

application/json
text
string
required

The message text. Leading and trailing spaces are removed. Has the same length limit as a message typed in the inbox.

Minimum string length: 1
author_id
string | null

The account_id of the member who writes the message, from List members. Defaults to the API key's creator (created_by in Retrieve the current API key). The member must be active, have the owner, admin, or agent role, and have access to the AI agent.

Maximum string length: 64

Response

The saved message.

object
any
required
id
string
required
conversation_id
string
required
author
object
required

Who sent the message.

type
enum<string>
required

buttons, carousel, form, booking, csat_survey, end_chat, email_prompt, contact_card, and action messages have details in data. action messages record what an AI agent's actions did, such as HTTP requests and integrations, and a chatbot's handoffs to the team. Only the team sees them. carousel and contact_card messages come from chatbots. A chatbot's image, video, audio, and document messages include the file's url in data. Other types come from other channels and only have text. Files of any type are in attachments.

Available options:
text,
buttons,
carousel,
form,
booking,
csat_survey,
end_chat,
email_prompt,
action,
contact_card,
attachment,
image,
video,
audio,
document,
sticker,
other
text
string | null
required

The message text, in Markdown. AI replies don't include inline citation markers; their sources are in data. null for messages with only data.

data
object
required

Details of the message, depending on its type. text messages from the agent include their sources. null for other text messages and for an AI agent's media messages.

attachments
object[]
required

Files sent with the message, in order. A caption is the message's text.

is_note
boolean
required

Whether the message is an internal note, which the user never sees.

sent_by_website
boolean
required

Whether the website sent this user message with window.Chatling.sendMessage(), rather than the user typing it.

is_hidden
boolean
required

Whether the website sent this message with hidden: true. The AI agent receives hidden messages, but the user never sees them.

rating
enum<string> | null
required

The rating of an AI-written answer, given by the user in the widget or set with Update a message. Always null for other messages.

Available options:
positive,
negative,
null
created_at
string<date-time> | null
required
delivery_error
object | null
required

Set if the channel, such as WhatsApp, rejected the reply. The reply is saved and shown as failed in the inbox. Always null for notes.