Cancel Workflow Run
Request cancellation of a running, queued, or paused workflow run. Cancelling a run that has already reached a terminal state succeeds with no effect rather than returning an error. The reason field is present on every response, including full successes — recorded is the success value; it is not a partial-failure marker. A run produced by a table workflow group is a 409 when its cell can no longer accept the cancellation, because the run and its cell must reach the cancelled state together.
/api/v2/workflows/{id}/runs/{runId}/cancelAuthorization
apiKey Your Sim API key, personal or workspace-scoped. Generate one from the Sim dashboard under Settings > API Keys. A workspace API key is not accepted everywhere: operations that act on behalf of a specific human — administrative reads, secret access, and irreversible or governance-affecting writes — always reject it, whatever role the key carries. Each such operation says so in its own description, and the rejection surfaces as 403 unless the operation conceals unauthorized resources, in which case it is reported as 404. Use a personal API key for those.
In: header
Path Parameters
Unique workflow identifier.
1 <= lengthUnique workflow run identifier.
^[A-Za-z0-9._:-]+$1 <= length <= 128Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://www.sim.ai/api/v2/workflows/string/runs/run_8f14e45f-ceea-467f-a/cancel"{
"data": {
"success": true,
"runId": "run_8f14e45f-ceea-467f-a",
"redisAvailable": true,
"durablyRecorded": true,
"locallyAborted": true,
"pausedCancelled": false,
"reason": "recorded"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}