Runs
Cancel Run
Cancel a pending, running, or waiting workflow run.
POST
Cancel a running or pending workflow run. Cancellation is delivered through Temporal, so the response can carry one of three states:
cancelled— the run reached a cancelled terminal state.cancellation_requested— the cancel signal was accepted; the run will reachcancelledshortly. Re-poll Get Run to observe the transition.cancellation_failed— Temporal rejected the cancel (e.g. the run already finished). The returnedrunreflects the actual current state.
command_id is an idempotency key — replaying the same value never enqueues a second cancel.
Authorizations
Path Parameters
Body
application/json
Optional request payload for cancel workflow command idempotency.
Optional idempotency key for deduplicating cancel commands
Response
Successful Response
Response for cancel workflow endpoint.
A single execution of a workflow.
Whether immediate cancellation signaling was available
Cancellation delivery state from this request
Available options:
cancelled, cancellation_requested, cancellation_failed