Skip to main content
POST
Send a message to your agent and receive a response. The API follows a conversational format — pass the full message history to maintain context across turns.

Headers

Body parameters

string
required
Your agent’s ID. Find it in the dashboard under Settings → General.
array
required
The conversation history. Each message is an object with role and content.
boolean
default:"true"
Whether to stream the response as server-sent events (SSE). Defaults to the agent’s stream setting if not specified.
string
Override the agent’s default AI model. Must be a model available on your plan. If omitted, the agent’s configured model is used.

Response

Streaming (default)

The API streams the response as server-sent events (SSE). Each chunk is prefixed with data: and the stream terminates with data: [DONE]. After the stream completes, a message_payload event is sent containing any Knowledge Base sources cited in the response.

Non-streaming

When stream is set to false, the API returns a single JSON response with the complete message, token usage, and cited resources.
array
Website URLs from the Knowledge Base that were cited in the response. Only returned when Display Links to References is enabled in the messenger settings. Each object includes id, url, title, and type.

Multi-turn conversations

To maintain context across multiple exchanges, include previous messages in the messages array. The agent uses the full history to generate more relevant responses.
Including conversation history improves response quality significantly. Without it, each request is treated as a standalone question and the agent loses context from earlier messages.