Skip to main content
POST
https://agentgate.mynewapi.com
/
v1
/
runs
/
{id}
/
cancel
curl -X POST https://agentgate.mynewapi.com/v1/runs/run_abc123/cancel \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "id": "run_abc123",
  "status": "cancelled",
  "cancelledAt": "2024-01-15T10:32:00Z"
}
id
string
required
Run ID to cancel (format: run_xxxxx).
id
string
Run identifier.
status
string
New status (will be cancelled).
cancelledAt
string
ISO 8601 timestamp of cancellation.
Only runs in pending or running status can be cancelled.
curl -X POST https://agentgate.mynewapi.com/v1/runs/run_abc123/cancel \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "id": "run_abc123",
  "status": "cancelled",
  "cancelledAt": "2024-01-15T10:32:00Z"
}