Skip to main content
DELETE
/
sandboxes
/
{sandbox_id}
/
commands
/
{pid}
Kill Command
curl --request DELETE \
  --url https://api.declaw.ai/sandboxes/{sandbox_id}/commands/{pid} \
  --header 'X-API-Key: <api-key>'
{
  "killed": true
}
Kills a background process tracked in the sandbox process list and removes it from the list. Returns { "killed": true } if the process was found and removed, or { "killed": false } if it was not in the tracked list.
This endpoint removes the process from the API’s tracking list. The underlying VM process termination is handled by the envd daemon.

Path Parameters

sandbox_id
string
required
The sandbox identifier. Format: sbx-<8 chars>.
pid
integer
required
Process ID of the background command to kill.Example: 42

Response

killed
boolean
true if the process was found and removed. false if no process with that PID was tracked.

Example

curl -X DELETE https://api.declaw.ai/sandboxes/sbx-a1b2c3d4/commands/42 \
  -H "X-API-Key: YOUR_API_KEY"
Response
{
  "killed": true
}

Error Responses

StatusCause
400pid path parameter is not a valid integer
401Missing or invalid API key