Skip to main content
POST
Hard stop a session immediately

Authorizations

Authorization
string
header
required

A Recursion API key, created in the console under API keys.

Path Parameters

session_id
string<uuid>
required

Session id (UUID) as returned by startSession or listSessions.

Response

Response body of POST /v1/sessions/{session_id}/cancel. Cancel is terminal for the run but not for the record: the session is stopped and the sandbox torn down, while the session, its events, and its outcomes remain readable. The session row itself is removed from reads only by the separate soft-delete endpoint.

Response body of POST /v1/sessions/{session_id}/cancel. Cancel is terminal for the run but not for the record: the session is stopped and the sandbox torn down, while the session, its events, and its outcomes remain readable. The session row itself is removed from reads only by the separate soft-delete endpoint.

cancelled
boolean
required

Always true. The session was stopped and the sandbox closed; failures are HTTP errors instead, so this field never reports false. It is also true when the session had already reached a terminal state, making cancel safe to retry.