POST/v1/flow-runs/cancel

Cancel matching flow runs

Cancels matching paused or queued flow runs in a project. Supply projectId and optionally filter the runs by identifiers, flow, status, or creation time.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

7 body fields

Filters identifying the flow runs to cancel. projectId is required; other fields are optional.

createdAfterstringoptional
Filter to flow runs created after this value.
createdBeforestringoptional
Filter to flow runs created before this value.
excludeFlowRunIdsarray<string>optional
Flow-run identifiers to exclude from cancellation. Each identifier must be exactly 21 alphanumeric characters.
flowIdarray<string>optional
Flow identifiers to include. Each identifier must be exactly 21 alphanumeric characters.
flowRunIdsarray<string>optional
Flow-run identifiers to cancel. Each identifier must be exactly 21 alphanumeric characters.
projectIdstringrequired
The identifier of the project containing the flow runs. Must be exactly 21 alphanumeric characters.
statusarray<string>optional
Flow-run statuses to include: `PAUSED` or `QUEUED`.

1 status code
200Returns the result of the flow-run cancellation request.

Error handling

The request body must include projectId, which must be exactly 21 alphanumeric characters. Each identifier in flowRunIds and excludeFlowRunIds, and each value in flowId, must also be exactly 21 alphanumeric characters; status accepts only PAUSED or QUEUED.