Skip to main content
POST
Cancel Runs

Query Parameters

action
enum<string>
default:interrupt

Cancellation strategy: 'cancel' for hard cancel, 'interrupt' for cooperative interrupt.

Available options:
cancel,
interrupt

Body

application/json

Selector for POST /runs/cancel: a status filter, or thread_id plus run_ids.

status
enum<string> | null

Cancel every active run of the caller in this status. 'all' means pending and running.

Available options:
pending,
running,
all
thread_id
string | null

Thread that owns the runs listed in run_ids.

run_ids
string[] | null

Runs to cancel; requires thread_id.

Response

Successful Response