Interrupt Code Execution
DELETE
/v1/sandbox/{sandbox_id}/codeDELETE
/v1/sandbox/{'{sandbox_id}'}/codeYour instance endpoint, shown on the instance page in the dashboard. Each instance has its own host; there is no shared API host.
Description
Interrupts any currently running code execution in the sandbox. This sends an interrupt signal to the running process, causing it to terminate. Any active SSE stream for the interrupted execution will receive an exit or error event before closing.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sandbox_id | string | Yes | Sandbox ID or name |
Responses
200 Success
| Property | Type | Description |
|---|---|---|
status | string | Always "ok" on success |
default An unexpected error response.
| Property | Type | Description |
|---|---|---|
code | integer | |
message | string | |
details | object[] |
Request
curl -X DELETE "https://your-instance.example.com/v1/sandbox/sb_abc123/code" \
-H "Authorization: Bearer <token>"const response = await fetch(
"https://your-instance.example.com/v1/sandbox/sb_abc123/code",
{
method: "DELETE",
headers: {
Authorization: "Bearer <token>",
},
}
);
const data = await response.json();
console.log(data); // { status: "ok" }import requests
response = requests.delete(
"https://your-instance.example.com/v1/sandbox/sb_abc123/code",
headers={"Authorization": "Bearer <token>"},
)
print(response.json()) # {"status": "ok"}Response
{"status": "ok"}{"code": 0, "message": "string", "details": [{"@type": "string"}]}
