Skip to main content
POST
/
flows
/
runs
/
{flow_run_uid}
/
cancel
Cancel a flow run
curl --request POST \
  --url https://api.edges.run/v1/flows/runs/{flow_run_uid}/cancel \
  --header 'X-API-Key: <api-key>'
{
  "uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "user_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "workspace_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "last_error": {
    "label": "<string>",
    "message": "<string>"
  },
  "callback": {
    "url": "<string>"
  },
  "status": "CREATED",
  "output_count": 0,
  "scheduled_flow_run_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "started_at": "<string>",
  "finished_at": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>"
}
Cancel a flow run that is currently running or pending. This immediately stops the flow and prevents any further processing. Use Cases:
  • Stop a flow that was started with incorrect parameters
  • Cancel a long-running flow that is no longer needed
  • Abort processing to avoid unnecessary credit consumption
Cancellable Statuses: A flow run can be cancelled if it’s in one of these states:
  • CREATED - Flow is created but not yet started
  • QUEUED - Flow is waiting to be processed
  • SCHEDULED - Flow is scheduled for future execution
  • RUNNING - Flow is currently processing
Cancelling a flow run is irreversible. Any work already completed will be lost, and you will need to start a new flow run if you want to process the same inputs again.
Credits consumed before cancellation are not refunded. Cancel early to minimize credit usage.

Authorizations

X-API-Key
string
header
required

Path Parameters

flow_run_uid
string<uuid>
required

Flow run UUID

Response

Cancel the flow run

Cancel the flow run

uid
string<uuid>

Flow Run UUID

user_uid
string<uuid>

Member/User UUID

workspace_uid
string<uuid>

Workspace UUID

last_error
object

Last error message

callback
object

Callback

status
enum<string> | null

Flow Run status

Available options:
CREATED,
INVALID,
QUEUED,
SCHEDULED,
BLOCKED,
STOPPED,
RUNNING,
FAILED,
PARTIAL_SUCCEEDED,
SUCCEEDED
output_count
integer | null
default:0

Number of outputs generated by the flow run (only available when the flow run is finished)

scheduled_flow_run_uid
string<uuid> | null

If the flow run is scheduled, this field indicates the scheduled flow run UUID.

started_at
string | null

Started at

finished_at
string | null

Finished at

created_at
string

Created at

updated_at
string | null

Updated at