Skip to main content
POST
Send a message to a coding session

Authorizations

Authorization
string
header
required

Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.

Headers

Idempotency-Key
string
required

A unique key for this message. Retrying with the same key and body returns the same input instead of delivering it twice; a different body with the same key returns idempotency_conflict.

Required string length: 1 - 200
Pattern: ^[A-Za-z0-9_.:-]+$
Example:

"thread-reply-1715000000.0001"

Path Parameters

session_id
string
required

The session's identifier.

Pattern: ^[a-f0-9]{24}$
Example:

"6820f3a4e7b91d003c45a1f2"

app_id
string
required

Body

application/json
text
string | null

A message for the session. While it works, the message is folded into the current turn; while it waits for input, it answers the open question; after it finishes, it starts a follow-up turn on the same branch.

Required string length: 1 - 20000
Example:

"Also add a test for the redaction."

answers
SessionAnswer · object[] | null

Structured answers to the open question, by question index. Requires input_request_id.

Required array length: 1 - 10 elements
approve
boolean | null

Approve (true) or decline (false) the open approval request. Requires input_request_id.

input_request_id
string | null

The input_request_id from Get a coding session's open question. A session that has moved on refuses the input with input_request_changed.

Required string length: 1 - 100
author
string | null

Who wrote the message, when it isn't the session's own user, for example a teammate in a shared thread. The text is attributed to them.

Required string length: 1 - 100
Example:

"Dana"

Response

Successful Response

id
string
required

The input's identifier.

Example:

"6820f3a4e7b91d003c45a1f9"

state
enum<string>
required

pending until the session takes the input.

Available options:
pending,
delivered,
failed
Example:

"pending"

session
SessionResponse · object
required
error_code
string | null

Why a failed input wasn't delivered, for example input_request_changed, session_busy, cancelled or delivery_interrupted; null otherwise.

Example:

null