Update Task Status
PATCH/external/v1/tasks/:id/statusMoves a task to pending, in_progress or completed. Completing records who completed it and when; moving out of completed reopens the task.
Authentication
Requires tasks:write permission. The task must be visible to the user who created the API key.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Task identifier (UUID) |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
status | string | Yes | pending, in_progress or completed |
Playbook steps and recurring tasks
Completing a step of a playbook run advances the run's progress; when the last step is done, the run becomes completed. Completing a recurring task creates the next occurrence and returns its id in next_occurrence_id. Steps of a cancelled run cannot change status, including the steps completed before the cancellation.
Request
bash
curl --request PATCH \
--url "https://app.getraze.com/external/v1/tasks/7b1e4c52-9a0d-4f1e-8c35-2d6f0a9b3e11/status" \
--header "Content-Type: application/json" \
--header "X-API-Key: YOUR_API_KEY" \
--data '{ "status": "in_progress" }'javascript
const axios = require('axios');
const taskId = '7b1e4c52-9a0d-4f1e-8c35-2d6f0a9b3e11';
const response = await axios.patch(
`https://app.getraze.com/external/v1/tasks/${taskId}/status`,
{ status: 'in_progress' },
{ headers: { 'X-API-Key': 'YOUR_API_KEY' } }
);
console.log(response.data);python
import requests
task_id = '7b1e4c52-9a0d-4f1e-8c35-2d6f0a9b3e11'
response = requests.patch(
f'https://app.getraze.com/external/v1/tasks/{task_id}/status',
headers={'X-API-Key': 'YOUR_API_KEY'},
json={'status': 'in_progress'}
)
print(response.json())Response
json
{
"success": true,
"data": {
"id": "7b1e4c52-9a0d-4f1e-8c35-2d6f0a9b3e11",
"status": "in_progress",
"is_completed": false
},
"changed": true,
"next_occurrence_id": null
}data is the full task (format of Get Task). changed is false when the task already had that status; nothing is written in that case.
Errors
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | Missing or invalid status, or the task is a step of a cancelled playbook run |
| 404 | NOT_FOUND | Task not found, or not visible to the key's creator |