Skip to main content
POST

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 | null
required

The message text, trimmed before it's saved. Required unless you pass attachment_ids.

Required string length: 1 - 20000
attachment_ids
string<uuid>[]

IDs of unsent files from Upload an attachment to send with the message, in the order they appear. In ai mode, the AI agent may accept fewer than 3 images. AI agents only.

Required array length: 1 - 3 elements
stream
boolean
default:false

Whether to stream the reply as server-sent events while the agent writes it, instead of waiting for the whole turn.

ai
object

The AI settings for the reply. Required for chatbot conversations. Not allowed for AI agents.

Response

The saved user message and the agent's replies, as a turn object, or as a stream of events with stream: true.

object
any
required
message
object
required
replies
object[]
required

The agent's replies, such as text followed by buttons. Chatbots reply with one text message. [] in live and pending_handoff modes, if a reply exclusion rule matches, or on reply_error.

conversation
object
required
reply_error
object | null
required

Set if the user message was saved but the agent couldn't reply. No AI credits are used. Retrying with the same Idempotency-Key returns this response without saving the message again.