Skip to main content
POST
Cancel run

Authorizations

Authorization
string
header
required

Company API key (mwk_) or personal access token (mel_). A PAT requires X-Workspace-ID on company-scoped routes. An API key implies its own company.

Headers

X-Workspace-ID
string<uuid>

Company UUID for a personal token on company-scoped operations. A company API key already binds its company.

Path Parameters

runId
string
required

runId from the corresponding authorized response.

Query Parameters

expected_status
string

Optional expected_status filter or control; see the operation contract.

queue_action
string

Optional queue_action filter or control; see the operation contract.

task_id
string

Optional task_id filter or control; see the operation contract.

Response

RunResponse plus optional cancelled_input:{task_id:UUID,message_id:UUID,content:string,restore_to_input:boolean,attachments:object[]}. Cancelling a Run that already ended returns it unchanged.

id
string
required
execution_owner_id
string
required
worker_id
string
required
task_id
string
required
workspace_id
string
required
status
string
required
dispatched_at
string | null
required
started_at
string | null
required
completed_at
string | null
required
result
any
required
error
string | null
required
attempt
integer
required
max_attempts
integer
required
created_at
string
required
delivered_message_ids
string[]
required
kind
string
required
access
object | null
model
string
thinking_level
string
service_tier
string
execution_receipt
object | null
failure_reason
string
parent_run_id
string | null
work_dir
string
relative_work_dir
string
branch_name
string
trigger_message_id
string | null
coalesced_message_ids
string[]
trigger_summary
string | null
automation_invocation_id
string
interaction_continuation
object | null
attribution
object | null
usage
object[]
billed
object | null
cancelled_input
object | null