Skip to main content
DELETE
/
sandboxes
/
{sandbox_id}
Kill Sandbox
curl --request DELETE \
  --url https://api.declaw.ai/sandboxes/{sandbox_id} \
  --header 'X-API-Key: <api-key>'
{
  "killed": true
}
Sets the sandbox state to killed and instructs the orchestrator to terminate the VM. This action is irreversible — all in-memory state and filesystem contents are lost. Returns { "killed": true } on success.
Killing a sandbox destroys all data inside the VM. If you need to preserve the state, create a snapshot first.

Path Parameters

sandbox_id
string
required
The sandbox identifier. Format: sbx-<8 chars>.Example: sbx-a1b2c3d4

Response

killed
boolean
Always true when the sandbox was found and the kill was dispatched.

Example

curl -X DELETE https://api.declaw.ai/sandboxes/sbx-a1b2c3d4 \
  -H "X-API-Key: YOUR_API_KEY"
Response
{
  "killed": true
}
The SDK kill() method wraps this endpoint. Always call it in a try/finally block to avoid leaving orphaned sandboxes running.

Error Responses

StatusCause
401Missing or invalid API key
404Sandbox not found