POST
Send a user message

Authorizations

Authorization
string
header
required

A server API key, ask_.... Carries a role.

Headers

Idempotency-Key
string

Up to 255 characters. The key is scoped to the calling principal, the HTTP method, the path and the key. Only 2xx responses are stored, for 24 hours. The same key with the same body replays the stored response, with the response header Idempotency-Replayed: true. The same key with a different body is 422 idempotency_key_reuse. If the first request is still running, the answer is 409 idempotency_in_progress; a record in progress for more than 60 seconds is taken over by the new request. A key that is longer than 255 characters or not printable ASCII is 400 invalid_idempotency_key.

Maximum string length: 255

Path Parameters

id
string
required
Example:

"sess_0123456789abcdef01234567"

Body

application/json
content
string
required
Required string length: 1 - 200000
metadata
object

Response

Accepted. The stored user message event.

id
string
required
object
string
required
Allowed value: "event"
session_id
string
required
seq
integer
required

Rises by one for each event in the session.

type
enum<string>
required
Available options:
message,
tool_call,
tool_result,
status,
error
data
object
required

Depends on type.

created_at
string<date-time>
required