Cancel an in-progress run
POST
/v1/workflows/runs/{runId}/cancel
const url = 'https://your-notavia-host/v1/workflows/runs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/cancel';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” runId
required
string format: uuid
Responses
Section titled “ Responses ”Cancellation requested; current status returned.
Media type application/json
object
status
string
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
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
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
Example generated
{ "error": { "type": "example", "code": "example", "message": "example", "param": "example" }}