Skip to main content
POST
Cancel a sandbox execution

Authorizations

X-Access-Token
string
header
required

Sandbox data-plane token — the sandbox_access_token returned by the create/connect endpoints. Used for /files, Sandbox-Exec, and other data-plane endpoints; the control plane (/api/v2) does not accept it, and conversely the control plane's Authorization: Bearer is invalid on the data plane.

The token is bound to its sandbox: using sandbox A's token against sandbox B's host fails. It stays valid until the sandbox's lifetime ends; there is no separate rotation endpoint (rotate_traffic_token rotates the port traffic token traffic_access_token and does not affect this one).

Headers

X-Request-ID
string

Ignored. The server generates its own request ID (req-<uuid>) for every request and returns it in the X-Request-ID response header and the body's request_id.

Required string length: 1 - 128

Path Parameters

execution_id
string<uuid>
required

Public execution identifier returned by the create operation. A value that is not a valid UUID is treated as an unknown execution and returns 404 Execution.NotFound.

Response

Cancellation accepted and is being processed.

request_id
string
required

Server-generated request ID (req-<uuid>), identical to the X-Request-ID response header.

execution_id
string<uuid>
required

Public execution identifier.

sandbox_id
string
required

Echo of the data-plane addressing key (i.e. sandbox_key; the data plane identifies the instance by the key in the host).

status
enum<string>
required

Public lifecycle status of a sandbox execution. timed_out means the per-command time limit (execution_timeout_seconds) was reached and the command was terminated (SIGTERM, then SIGKILL after a grace period); exit_code is then null.

Available options:
pending,
running,
cancelling,
succeeded,
failed,
cancelled,
timed_out