Skip to main content
POST
Send messages
Sends one or more messages to an agent session: additional instructions, answers to the agent’s questions, or a redirection of the task. Returns 202 Accepted. The message is delivered asynchronously: the agent processes it on its next reasoning step. Messages adapt to the session’s state rather than failing. A paused session is auto-resumed before delivery, a queued session buffers the message until it starts, and a finished session is restarted (back to pending, subject to your token budget) with the message delivered to the relaunched agent.

Path parameters

id
string
required
The session ID.

Request body

The body is a discriminated union: send either a single message or a batch.

Single message

type
string
default:"user_message"
"user_message". May be omitted.
message
string
required
The message content.
images
array
Optional list of base64 data URIs to attach to the message (e.g. data:image/png;base64,...).
caller_id
string
Identifies the message sender. Defaults to user; leave it unset for normal user input.

Batch

type
string
required
Must be "batch".
messages
array
required
Array of message objects, each with type: "user_message" and message. Processed in order.

Examples

Send a single message

Send a batch of messages


Errors