Cancel a deployment run
⚠️
Preview — this feature is being built; the design below is the spec.
POST https://app.syntic.ai/v1/deployments/{deployment_id}/runs/{run_id}/cancelStop a queued or running run. A queued run never starts; a running run interrupts its session and archives it. Tokens already used are billed. The deployment itself stays active and fires again on its next trigger.
For how this fits into a full workflow, see Deployments.
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer <key>: a private inference key (sk_live_...). See Authentication. |
syntic-beta | Yes, while in preview | agents-2026-11-01. Without it the call fails with 400 beta_required. See Versioning. |
Idempotency-Key | No | Up to 255 characters. Retrying with the same key within 24 hours returns the first result instead of acting twice. See Idempotency. |
Path parameters
| Parameter | Type | Description |
|---|---|---|
deployment_id | string | The deployment id, starting with dep_. |
run_id | string | The run id, starting with drn_. |
Response
200 OK, Content-Type: application/json
{
"id": "drn_01JC9F1H3K5M7P9R1T3V",
"type": "deployment_run",
"deployment_id": "dep_01JC6C8E0G2J4L6N8Q0S",
"fired_at": "2026-11-05T07:00:00Z",
"trigger_type": "schedule",
"status": "canceled",
"session_id": "sesn_01JC9F2J4L6N8Q0S2U4W",
"input": {
"report_date": "2026-11-04"
},
"skip_reason": null,
"error": null,
"started_at": "2026-11-05T07:00:02Z",
"finished_at": "2026-11-05T07:03:40Z"
}| Field | Type | Description |
|---|---|---|
trigger_type | string | schedule, webhook or manual. |
status | string | queued, running, succeeded, failed, canceled or skipped. |
session_id | string or null | The session the run created. null for skipped runs. |
skip_reason | string or null | overlap (previous run still going and overlap_policy is skip), paused or budget_exhausted. |
error | object or null | Set when status is failed. |
Examples
curl -sS -X POST "https://app.syntic.ai/v1/deployments/dep_01JC6C8E0G2J4L6N8Q0S/runs/drn_01JC9F1H3K5M7P9R1T3V/cancel" \
-H "Authorization: Bearer $SYNTIC_API_KEY" \
-H "syntic-beta: agents-2026-11-01" \
-H "Idempotency-Key: 8d6f0c1e-4b2a-4a57-9f0e-2f1d3c4b5a69"Errors
Errors use the error envelope and carry a request_id. Codes specific to this operation:
| Status | type | code | When |
|---|---|---|---|
| 400 | invalid_request_error | beta_required | The syntic-beta header is missing. |
| 409 | conflict_error | run_finished | The run already succeeded, failed, was skipped or was canceled. |
| 404 | not_found_error | run_not_found | No run with this id on the deployment. |
| 401 | authentication_error | invalid_api_key | The key is missing, unknown, revoked or expired. |
| 429 | rate_limit_error | rate_limited | Too many requests; wait for Retry-After. See Rate-limit headers. |
Was this page helpful?