Skip to content

Cancel Session Turn

POST/v1/agents/sessions/{session_id}/cancel

SandBase extension. Request cancellation of the in-progress Turn. The body may be empty or {}. Idempotency-Key is required. If the Session is idle, the call still returns 202 with accepted true and changes nothing. The standard alternative is sending an agent.session.input.cancel event.

Path parameters

stringsession_idrequired

Session ID (ses_ prefix).

Headers

stringIdempotency-Keyrequired

1-128 characters, no leading or trailing whitespace. Reuse the same key and body when retrying; the same key with a different body returns 409.