Skip to main content
POST
Send message to agent

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Agent-Id
string

The agent to act on. Required for team API keys that cover more than one agent; ignored for per-agent keys.

Body

application/json
message
string
required

User message

Maximum string length: 8000
Example:

"What products do you have?"

conversationId
string

Conversation ID to continue. Omit to start a new conversation.

Example:

"clxyz123"

identity
object

User identity for personalization and tracking

Example:

Response

Server-Sent Events. Each event is data: <json> followed by a blank line; the JSON has a type field.

The response is of type string.

Example:

"data: {\"type\":\"user_message\",\"conversationId\":\"clx1conv\",\"messageId\":\"clx1msg\"}\n\ndata: {\"type\":\"chunk\",\"conversationId\":\"clx1conv\",\"content\":\"Hi\"}\n\ndata: {\"type\":\"completed\",\"conversationId\":\"clx1conv\",\"messageId\":\"clx2msg\"}\n\n"