Skip to main content
POST
Stream a message

Authorizations

Authorization
string
header
required

Access token from POST /management/v1/auth/token (publishable-key exchange) or a login session. Publishable-key tokens are agent-scoped and serve the messaging surface; login tokens also serve management.

Headers

Last-Event-ID
string | null

Body

application/json

Send a message to your agent — the agent is identified by your access token. thread_id is optional: present -> append to that thread; absent -> a new thread is created automatically and its id returned.

text
string
required
user_id
string
required
thread_id
string | null
Pattern: ^[0-9a-fA-F]{24}$
image_url
string | null

Signed image URL for vision input.

agent_variables
AgentVariables · object | null

Per-message values for the agent's configured context variables.

Response

Successful Response

First event of a stream: the resolved thread id (a client can't read response headers mid-stream). Unsequenced — it replays on every resume.

data
ThreadStreamEventData · object
required
type
string
default:thread
Allowed value: "thread"