Everstack
API ReferenceSandboxInterrupt Command

Interrupt Sandbox Command

DELETE/v1/sandbox/{sandbox_id}/command
DELETE/v1/sandbox/{'{sandbox_id}'}/command

Your instance endpoint, shown on the instance page in the dashboard. Each instance has its own host; there is no shared API host.

Description

Sends an interrupt signal to a background command running in the specified sandbox. Use the command_id returned when the command was launched with background: true.

Path Parameters

ParameterTypeRequiredDescription
sandbox_idstringYesSandbox ID or name

Request Body

PropertyTypeRequiredDescription
command_idstringYesID of the background command to interrupt

Responses

200 Success

PropertyTypeDescription
statusstringResult of the interrupt operation. Value is "interrupted" on success

default An unexpected error response.

PropertyTypeDescription
codeinteger
messagestring
detailsobject[]

Request

curl -X DELETE "https://{instance}.{region}.everstack.ai/v1/sandbox/{sandbox_id}/command" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"command_id":"cmd_abc123"}'
const sandboxId = "your-sandbox-id";
const response = await fetch(`https://{instance}.{region}.everstack.ai/v1/sandbox/${sandboxId}/command`, {
  method: "DELETE",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "command_id": "cmd_abc123",
  }),
});
const data = await response.json();
import requests

sandbox_id = "your-sandbox-id"
response = requests.delete(
    f"https://{instance}.{region}.everstack.ai/v1/sandbox/{sandbox_id}/command",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "command_id": "cmd_abc123",
    },
)
data = response.json()

Response

{
  "status": "interrupted"
}
{
  "code": 0,
  "message": "string",
  "details": [
    {
      "@type": "string"
    }
  ]
}