Skip to main content
POST
https://api.crewship.dev
/
v1
/
runs
/
{id}
/
cancel
curl -X POST https://api.crewship.dev/v1/runs/run_xyz789abc/cancel \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "success": true,
  "status": "canceled"
}

Path Parameters

id
string
required
Run ID (e.g., run_xyz789abc)

Response

success
boolean
Whether the cancellation was successful
status
string
The updated run status (canceled)
curl -X POST https://api.crewship.dev/v1/runs/run_xyz789abc/cancel \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "success": true,
  "status": "canceled"
}

Notes

  • Only runs with status pending or running can be canceled
  • Canceling a run stops execution and destroys the underlying machine
  • The run status will be set to canceled with a completed_at timestamp