v1

latestOpenAPI 3.1.0MIT2026-08-0481194343.8 KB
workflows

Cancel a workflow run

Scope: workflows:write. Free.

post/v1/workflows/runs/{run_id}/cancel

Response

The cancelled workflow run.

idstring required
object'workflow.run' required
status'queued' | 'running' | 'awaiting_human' | 'succeeded' | 'failed' | 'cancelled' | 'timed_out' required
workflow_idstring nullable
workflow_versioninteger nullable
machine_idstring nullable
inputsobject
outputobject nullable
errorobject nullable
awaiting_human_reasonstring nullable
awaiting_step_idstring nullable
iterations_usedinteger
spent_centsinteger
budget_centsinteger nullable
webhook_urlstring nullable

Workflow lifecycle callback destination. Workflow callbacks are best-effort in-process notifications (up to 3 attempts), have no durable delivery UUID/outbox, and can be missed if the worker fails. Reconcile with GET /v1/workflows/runs/{run_id}.

webhook_secretstring nullable

Returned by create and its exact bounded Idempotency-Key replay; null on get/list. The pinned per-run secret is encrypted at rest through delivery/replay recovery and later scrubbed.

metadataobject nullable
created_atstring nullable
started_atstring nullable
finished_atstring nullable
request_idstring nullable