Skip to main content
POST
Cancel a workflow run

Authorizations

Authorization
string
header
required

Secret key (sk_live_...)

Headers

Idempotency-Key
string

Optional key that makes the request idempotent. Retrying with the same key returns the original response instead of repeating the operation; keys expire after 24 hours. Any string up to 256 characters. See Idempotency.

Maximum string length: 256
Example:

"550e8400-e29b-41d4-a716-446655440000"

Path Parameters

workflow_run_id
string
required

Unique identifier for the workflow run (prefixed with wrun_).

Pattern: ^wrun_
Example:

"wrun_AbC123xYz456"

Response

OK

Workflow run object.

id
string
required

Unique identifier for the workflow run, prefixed with wrun_.

Pattern: ^wrun_
Example:

"wrun_AbC123xYz456"

object
string
required

Always workflow_run.

workflow_id
string
required

The workflow that was run.

Pattern: ^wflo_
Example:

"wflo_AbC123xYz456"

status
enum<string>
required

Lifecycle state. paused means the current step is waiting on external input; the step's own status carries the reason.

Available options:
queued,
running,
paused,
completed,
failed,
canceling,
canceled
result
null | string
required

Outcome once terminal: success only when every task run succeeded, failure if any failed, unknown otherwise. null while running and for a canceled run.

runtime_ms
null | integer<int64>
required

Milliseconds from the first step's start until the run reached a terminal status, excluding time spent queued. null until terminal.

session_id
null | string
required

The session every step of this run executes in. Prefixed with sess_. Assigned when the run is created through the API, or when a trigger-created run is admitted, so null while such a run is queued.

trigger_id
null | string
required

The trigger that created this run. Prefixed with trg_. null for runs created through the API.

steps
object[]
required

Per-step state, in definition order.

errors
null | object[]
required

Error objects, each naming its step, when the run failed. null otherwise.

created_at
string<date-time>
required
Example:

"2026-06-18T00:00:00Z"

updated_at
string<date-time>
required
Example:

"2026-06-18T00:00:00Z"

request_id
string

Unique identifier for the API request. Include this when contacting support.