Skip to main content
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 reach cancelled shortly. Re-poll Get Run to observe the transition.
  • cancellation_failed — Temporal rejected the cancel (e.g. the run already finished). The returned run reflects the actual current state.
The optional command_id is an idempotency key — replaying the same value never enqueues a second cancel.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

run_id
string
required

Body

application/json

Optional request payload for cancel workflow command idempotency.

command_id
string | null

Optional idempotency key for deduplicating cancel commands

Response

Successful Response

Response for cancel workflow endpoint.

run
WorkflowRun · object
required

A single execution of a workflow.

redis_available
boolean
default:true

Whether immediate cancellation signaling was available

cancellation_status
enum<string>
default:cancellation_requested

Cancellation delivery state from this request

Available options:
cancelled,
cancellation_requested,
cancellation_failed