Skip to content

Cancel an in-progress run

POST
/v1/workflows/runs/{runId}/cancel
curl --request POST \
--url https://your-notavia-host/v1/workflows/runs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/cancel \
--header 'Authorization: Bearer <token>'

Transitions the run to Cancelling (or immediately Cancelled if already in a terminal-adjacent state). Any scheduled wait_for_event timeout jobs are cancelled. Running Hangfire step jobs detect the cancellation flag and terminate cleanly.

runId
required
string format: uuid

Cancellation requested; current status returned.

Media type application/json
object
status
string
Allowed values: cancelling cancelled
Example
{
"status": "cancelling"
}

Missing or invalid credentials.

Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
nullable
Example generated
{
"error": {
"type": "example",
"code": "example",
"message": "example",
"param": "example"
}
}

Credentials do not have the required scope.

Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
nullable
Example generated
{
"error": {
"type": "example",
"code": "example",
"message": "example",
"param": "example"
}
}

Resource not found.

Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
nullable
Example generated
{
"error": {
"type": "example",
"code": "example",
"message": "example",
"param": "example"
}
}