Update task status
Move a task through its lifecycle. Moving to in_progress claims the task (assigns the caller as
owner, if it had none). Moving a task off completed clears its completion timestamp; if that task
tracks a topic_content_opportunity, the source opportunity is re-promoted so it reappears as a
current opportunity if it had gone stale.
PATCH /brands/{brand_id}/tasks/{task_id}/statusAuthorization
| Header | Type | Required |
|---|---|---|
Authorization | Bearer asky_sk_… | required |
Idempotency-Key | string | required on every write. See Idempotency |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
brand_id | uuid | required | From List brands |
task_id | uuid | required | A task’s id, visible in the app’s Action Hub (/actions/plan) |
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | required | todo, in_progress or completed |
notes | string | optional | Replaces the existing notes if given |
Request
cURL
curl --request PATCH \
--url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/tasks/7c1e9a3f-5b21-4d90-8c6e-1f4a2b8d5e73/status' \
--header 'Authorization: Bearer <api-key>' \
--header 'Idempotency-Key: 5b0e77d2-13a9-4f6a-8ce1-9a3f5e21c0aa' \
--header 'Content-Type: application/json' \
--data '{"status": "completed"}'Response
200
{
"data": {
"task_id": "7c1e9a3f-5b21-4d90-8c6e-1f4a2b8d5e73",
"status": "completed"
},
"request_id": "req_5b0e77d213a94f6a8ce1"
}Response fields
| Field | Type | Description |
|---|---|---|
data.task_id | uuid | required |
data.status | string | required. The status it was set to |
request_id | string | required. Also returned as the x-request-id header. Quote it when contacting support |
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | status is missing or not one of todo, in_progress, completed |
| 401 | invalid_token | The key is missing, malformed, or does not exist |
| 401 | token_expired | The key passed its expiry date |
| 401 | token_revoked | The key was revoked |
| 403 | insufficient_scope | The key does not carry write:opportunities |
| 403 | plan_required | This workspace is not enabled for API writes |
| 404 | not_found | The task does not exist for this brand, or this key is not allowed to reach it |
| 429 | rate_limited | Over 60 requests per minute on write endpoints |
Last updated on