Skip to main content
POST
Send a message
Adds a follow-up instruction to a running or finished Session, including an owned subagent Session. Child continuations retain their original execution permissions. Device execution requires devices:use in addition to run, including continuations and pending Device handoffs. Scope: run

Authorizations

Authorization
string
header
required

Your Reason API key from Settings › API keys. New keys use reason_; legacy ara_ keys remain accepted. Keys are capability-scoped: run, mcp:read, mcp:write, secrets:read, secrets:write, sessions:read, sessions:debug, devices:read, devices:write, devices:use, computers:read, computers:write, ssh:write, knowledge:read, memory:read, memory:write, skills:read, skills:write, pages:read, pages:write, repos:read, repos:write, reviews:read, reviews:write, deployment:read, analytics:read, org:read, org:write, attachments:read, attachments:write, guardrails:read, guardrails:write, network:read, network:write, automations:read, automations:write, agent_auth:read. devices:write, devices:use, computers:read, computers:write, ssh:write, network:read and network:write are opt-in, excluded from default keys. computers:read lists visible cloud and connected computers without waking them or granting execution access. devices:read discovers local Device targets; devices:use separately consents to local execution, so a discover-and-run local workflow needs both. devices:write manages enrollment and device grants; computers:write creates or deletes cloud computers; ssh:write manages retained SSH access. network:read reads the saved workspace network policy; network:write replaces custom allowed hosts and requires a current organization owner/admin. Legacy project PATCH requests containing network_allowed_hosts also require network:write plus their existing run scope and project management permission; saved project hosts do not affect current session egress. Only owners/admins can mint or manage keys with network:write; keys cannot grant themselves more authority. See /docs/network-policies for replacement semantics and runtime applicability. mcp:write manages MCP server configuration only; it does not authorize remote MCP-tool execution. sessions:read reads sessions, including the assistant, reasoning and tool activity in their events. sessions:debug is privileged: only for organization owners/admins, it expands session events to the full diagnostic projection (diagnostic event kinds, status text and raw event metadata).

Scopes

run

Headers

X-Reason-Agent
string

Optional self-reported caller agent name. If absent, the server uses the User-Agent for external callers.

Maximum string length: 80

Path Parameters

orgId
string
required

Organization id or slug. Resolve it with GET /v3/self.

sessionId
string
required

The session id, returned as session_id by createSession and listSessions.

Body

application/json
message
string
required

The follow-up instruction for the agent. It reaches the running turn or starts the next one; the response's delivery says which.

delegation
object

Opt-in deeper delegation. Without it the Session's tree is unchanged: two levels deep (the Session's subagents may start their own, which cannot), and subagents never create Sessions. The whole tree inherits these limits and its agents can only lower them for what they start. Every tree keeps one cap of 100 live agents, whatever its depth. An omitted field takes the default. A dated runtime release (experimental_runtime_profile naming one) keeps the rules it was published with and returns 400 delegation_runtime_unsupported. On a message it is stored on the Session before the message is delivered and applies to every agent its tree starts afterwards; it persists for later messages until a request sets it again. Only a root Session takes it: a subagent or a Session a tree member created returns 400 delegation_not_root.

execution_budget
object

The task budget, as createSession takes it. While the Session's task is running, the message joins that task: spend_limit_usd lowers the task's shared spending limit for the Session and every agent in its tree, and is never raised (a higher value returns 400 execution_budget_raise_refused and the message is not sent); the task's deadline stays as it was admitted, so wall_clock_max_ms does not change it. A task is running while the Session's turn is queued or running; a task with a spending limit also runs until every Session it started has finished and the limit is not reached, so a message to a finished Session of that task, with or without execution_budget, continues it under the same limit and deadline. Otherwise the message starts a new task and both fields set that task's budget. A Session that is part of another Session's running task (a subagent, or a Session that task created) spends from its budget and returns 400 execution_budget_not_root.

attachments
object[]

Up to 10 attachments; maximum 64 MiB per file and 80 MiB total decoded bytes. The endpoint's request-body limit also applies to the encoded payload.

compaction
object

Sets the Session's context compaction policy from now on, for this and later turns (and the Sessions it starts afterwards). A turn already running keeps the threshold it started with; the next turn uses the new one.

client_message_id
string

Caller-generated idempotency key. Reusing it for the same Session returns the original accepted turn.

Required string length: 1 - 160
model
string

Optional model id from GET /agent-auth/models to retry this session on. A model override always starts a new continuation run, because a run's model is fixed at its first execution. Omit or use auto to keep the session's current model.

model_source_id
string

Switch the Session to this connected account from this turn on (a source_id from listAgentModels' groups[].accounts), as choosing an account in the app's model picker does, for example to move a chat off a subscription that ran out. Requires model, an id that account serves, so like a model override it needs a finished Session (or delivery: queue, whose turn starts on that account when it can serve then, else on that provider's next account, as the app's queue does). An account you cannot select, or one that does not serve model, returns 400 model_source_not_selectable with valid_model_sources. The turn routes from that account (model rollover), so it is refused with allow_model_rollover: false. If the account stops serving between admission and the turn's start, the message is kept and the response is 409 model_source_not_selectable with message_saved: true and its client_message_id to resend.

Required string length: 1 - 256
reasoning_effort
enum<string>

How much reasoning the model should use for the follow-up turn. Higher effort trades time and token usage for more deliberation; supported levels depend on the selected model. Omit to retain the Session's effort setting.

Available options:
minimal,
low,
medium,
high,
xhigh,
max
speed
enum<string>

Fast mode for the turn this message starts, as the model picker's: fast asks the provider for its priority tier and ultrafast for a ChatGPT subscription's Ultrafast tier (today a ChatGPT subscription's models; elsewhere it runs at standard speed). It applies when the message starts a turn (a finished Session, delivery: queue, a Reason's first message); a message steered into a running turn joins it at that turn's speed. Omit to keep the Session's current speed, as turns the Session starts itself (a report from a Session it started, a check-in, a pull request event) do; switching model without sending fast turns Fast off, for that turn and for later turns the Session starts itself. Send standard to turn Fast off. A Session started in one of the app's capability modes keeps that mode's standard speed unless the message also sends model or reasoning_effort.

Available options:
standard,
fast,
ultrafast
allow_model_rollover
boolean

Same as the create field, for this and later turns: when the Session's subscription or key runs out, the follow-up goes on with another source in its routing order: another connected account, which may serve another model (including another provider's), or Reason. A Session that already rolls over keeps doing so.

delivery
enum<string>

While a turn runs: steer (the default) hands the message to the running turn; queue holds it until the turn ends and then runs it as the next one. A queued message can be sent at once or withdrawn with its message_id (POST .../messages/{messageId}/steer, DELETE .../messages/{messageId}/queued). Not combinable with target.

Available options:
steer,
queue
question_operation_id
string

Answers the question card with this id (data.question_operation_id on the question's listSessionEvents event): message is the answer, and it goes to the turn that asked, as answering the card in the app does. The first answer wins: a later one returns 409 question_already_answered, and an id that names no open question returns 409 question_not_pending. A question the agent addressed to someone else returns 403 question_for_someone_else. An answer is idempotent with client_message_id (the response returns the one the server made when you send none), always steers the turn that asked (delivery: queue returns 400 invalid_question_answer_delivery), and cannot carry model, model_source_id, reasoning_effort, speed, allow_model_rollover or target (400 question_answer_settings_unsupported). When the asking turn holds another person's personal secrets or connections, the answer cannot enter it: it is kept as your own message and runs as your next turn when that one ends.

Pattern: ^[a-fA-F0-9]{64}$
target
object

Moves the Session: this message's turn, and every later one, runs on this target instead of the one the Session was on. Same shape and admission as the create target (cloud, a Device and root, or a named Machine). Only the conversation moves; files on the previous machine do not, unless they were pushed to the Session branch. A move starts a new continuation run, so the Session must have finished its current turn. Any target other than cloud needs the devices:use scope.

Response

Message accepted and delivered or queued for a continuation.

ok
boolean
required

True: the message was accepted.

delegation
object

The Session's delegation limits after this request, when it sent delegation.

delivery
string

How the message was delivered: queued_for_next_turn (a steer accepted into the running turn: the normal receipt, entering at its next model step), steered_live (the steer already entered it), held_in_queue (waits for the turn to end), started_continuation_run or reattached_warm_session (started a new turn), applied_to_queued_run, saved_for_follow_up (saved; see held_reason), queue_cancelled or continuation_blocked.

delivery_detail
string

What the delivery means for the sender, when it needs saying: for queued_for_next_turn, that the steer was accepted and is not to be resent or the Session cancelled; for started_continuation_run, that the new turn is queued and has not started; for applied_to_queued_run, that the turn was queued, waiting to start or resume.

continuation_session_id
string | null

The stable logical Session id after an accepted follow-up. Continue polling this id; Reason may run the turn in a hidden execution Attempt.

message_id
string

The accepted message's id, matching listSessionMessages. For delivery queue, use it to send the message at once or withdraw it while it waits.

client_message_id
string

The message's idempotency key: the client_message_id sent, or the one the server gave it. Resending the message with it returns this accepted turn instead of adding another.

held_reason
string

Present when delivery is saved_for_follow_up and the message is waiting instead of starting. session_machine_transition_pending: the Session's machine is changing; the message is delivered when the change settles, so do not send it again. If the change has not settled after 10 minutes the message is marked not delivered instead.