Push session events

POST/v1/sessions/{id}/events
Single entry point for user-initiated events (text submission, cancellation, regeneration, edit, stop, steer, queue hold/release/move, model config change). Accepts one or more events processed in array order. Answers 204, or with receipt set, 200 with the delivery receipt: duplicate when the session already accepted the idempotency key, so no new events follow for it.

Authorization

header

Authorization: Bearer <token>

An access token from Settings → Access tokens, with the scopes this call needs. Authentication

Path parameters

idstringrequired
TypeID with prefix "asess_".

Request body

application/json · required
eventsarray<TextSubmitted | Stopped | SessionSuggestionResolved | ...>required
Items
1 to 100
idempotencyKeystring | null
Idempotency key for this batch. Reusing a key returns duplicate. The actor applies the batch before persisting its stamp, so an actor crash in that window can replay the whole batch: delivery is at-least-once, not transactional exactly-once. A multi-event batch is stamped only after the complete batch succeeds, so retrying a partially executed batch may replay its accepted prefix.
Length
1 to 512
deliveryIdstring | null
Deprecated alias for idempotencyKey, accepted for one release. idempotencyKey wins when both are present.
Length
1 to 512
threadIdinteger
Thread to receive the events. Omit for the root thread; unlike listEvents, omission does not address the full stream.
Range
0 to 9007199254740991
receiptboolean
Answer 200 with the delivery receipt instead of 204, so the caller learns a duplicate. Omit for the 204 response; older servers ignore it and answer 204.

Responses

SessionPushEventsResultapplication/json

statusstringrequired
Value in
"accepted" | "duplicate"