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}/cancel

Stop 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

HeaderRequiredValue
AuthorizationYesBearer <key>: a private inference key (sk_live_...). See Authentication.
syntic-betaYes, while in previewagents-2026-11-01. Without it the call fails with 400 beta_required. See Versioning.
Idempotency-KeyNoUp to 255 characters. Retrying with the same key within 24 hours returns the first result instead of acting twice. See Idempotency.

Path parameters

ParameterTypeDescription
deployment_idstringThe deployment id, starting with dep_.
run_idstringThe 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"
}
FieldTypeDescription
trigger_typestringschedule, webhook or manual.
statusstringqueued, running, succeeded, failed, canceled or skipped.
session_idstring or nullThe session the run created. null for skipped runs.
skip_reasonstring or nulloverlap (previous run still going and overlap_policy is skip), paused or budget_exhausted.
errorobject or nullSet 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:

StatustypecodeWhen
400invalid_request_errorbeta_requiredThe syntic-beta header is missing.
409conflict_errorrun_finishedThe run already succeeded, failed, was skipped or was canceled.
404not_found_errorrun_not_foundNo run with this id on the deployment.
401authentication_errorinvalid_api_keyThe key is missing, unknown, revoked or expired.
429rate_limit_errorrate_limitedToo many requests; wait for Retry-After. See Rate-limit headers.
Was this page helpful?