Cancel Playbook Run
POST/external/v1/playbook-runs/:id/cancelCancels a run that is in progress. Steps not done yet become cancelled and leave everyone's task lists; completed steps stay as they are. A cancelled run cannot be resumed: start the playbook again if needed.
Authentication
Requires playbooks:run permission.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Run identifier (UUID) |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | No | Why the run was cancelled (max 1000 characters) |
Request
bash
curl --request POST \
--url "https://app.getraze.com/external/v1/playbook-runs/3ef8c1c3-c081-4187-a6aa-657fbf1a813b/cancel" \
--header "Content-Type: application/json" \
--header "X-API-Key: YOUR_API_KEY" \
--data '{ "reason": "Deal lost" }'javascript
const axios = require('axios');
const runId = '3ef8c1c3-c081-4187-a6aa-657fbf1a813b';
const response = await axios.post(
`https://app.getraze.com/external/v1/playbook-runs/${runId}/cancel`,
{ reason: 'Deal lost' },
{ headers: { 'X-API-Key': 'YOUR_API_KEY' } }
);
console.log(response.data);python
import requests
run_id = '3ef8c1c3-c081-4187-a6aa-657fbf1a813b'
response = requests.post(
f'https://app.getraze.com/external/v1/playbook-runs/{run_id}/cancel',
headers={'X-API-Key': 'YOUR_API_KEY'},
json={'reason': 'Deal lost'}
)
print(response.json())Response
The run, in the format of Get Playbook Run, with status: cancelled, cancelled_at and cancelled_reason.
Errors
| Status | Code | Description |
|---|---|---|
| 404 | NOT_FOUND | Run not found in this account |
| 409 | CONFLICT | The run is not in progress (already completed or cancelled) |