Skip to main content
POST
Answer the agent’s questions

Authorizations

Authorization
string
header
required

Effective API key. Send Authorization: Bearer sk-eai-...

Headers

Idempotency-Key
string

Client-chosen key for safe retries: 1-128 letters, digits, -, _, . or :. Use a new random UUID for each intended operation and the same key when retrying it. Do not put customer data or credentials in the key.

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

Path Parameters

id
string<uuid>
required

Session UUID, e.g. 00000000-0000-4000-8000-000000000001.

Example:

"00000000-0000-4000-8000-000000000001"

messageId
string
required

Message ID returned when the message was sent, or listed in the conversation.

Required string length: 1 - 200
Example:

"00000000-0000-4000-8000-000000000002"

Body

application/json
answer
object
required

answered with a value, or skipped.

Response

Answers accepted; the message, now running again.

id
string
required

Message ID returned when the message was sent, or listed in the conversation.

Required string length: 1 - 200
Example:

"00000000-0000-4000-8000-000000000002"

status
enum<string>
required

queued until the agent picks the message up, running while it works, then succeeded or failed. needs_input while the agent waits for answers to the questions in userInput; answer them with POST /sessions/{id}/messages/{messageId}/user-input. A cancelled turn reports failed. Messages are handled one at a time, in the order sent. New values can be added; tolerate values you do not recognize.

Available options:
queued,
running,
needs_input,
succeeded,
failed
message
string
required

The text that was sent.

reply
string | null
required

The agent’s reply in Markdown, once the message has finished; null before then. A failed message can carry a partial reply.

createdAt
string<date-time>
required

When the message was sent, in UTC.

finishedAt
string<date-time> | null
required

When the reply finished, in UTC; null until then.

failure
object | null
required

Why the message failed; null unless status is failed.

cancellationStatus
enum<string>

Present after a cancellation request. Cancelling means the stop was requested. Cancelled means the turn has stopped.

Available options:
cancelling,
cancelled
userInput
object

The questions the agent asked, present while status is needs_input.