Tasks
Tasks are work items for your team, usually linked to a case. RecovAI creates many automatically (with service-level deadlines); you can also create your own.
| Method | Path | What it does |
|---|---|---|
GET |
/tasks |
List tasks |
GET |
/tasks/{id} |
Get a task |
POST |
/tasks |
Create a task |
PATCH |
/tasks/{id} |
Update a task |
List tasks
Section titled “List tasks”/tasksRead onlyAPI key| Parameter | Type | Default | Description |
|---|---|---|---|
status |
string | Comma-separated: open, in_progress, completed, cancelled. |
|
case_id |
UUID | Only tasks on this case. | |
assigned_to |
UUID | Only tasks for this person. | |
priority |
string | low, normal, high or urgent. |
|
q |
string | Search title, description, case number and business name. | |
take |
integer | 100 |
Page size, 1–250. |
skip |
integer | 0 |
Number of tasks to skip. |
Example
Section titled “Example”curl "https://api.recovai.ai/tasks?status=open%2Cin_progress&case_id=5b0e2c1a-7d4f-4c2b-9a61-2f8e3d4c5b6a" \ -H "X-API-Key: $RECOVAI_API_KEY"<?php$ch = curl_init('https://api.recovai.ai/tasks?status=open%2Cin_progress&case_id=5b0e2c1a-7d4f-4c2b-9a61-2f8e3d4c5b6a');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('RECOVAI_API_KEY')],]);$body = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);curl_close($ch);
$result = json_decode($body, true);if ($status >= 400) { throw new RuntimeException($result['error'] . ': ' . ($result['details'] ?? ''));}const res = await fetch('https://api.recovai.ai/tasks?status=open%2Cin_progress&case_id=5b0e2c1a-7d4f-4c2b-9a61-2f8e3d4c5b6a', { method: 'GET', headers: { 'X-API-Key': process.env.RECOVAI_API_KEY },});const data = await res.json();if (!res.ok) throw new Error(`${data.error}: ${data.details ?? ''}`);import osimport requests
r = requests.get( "https://api.recovai.ai/tasks?status=open%2Cin_progress&case_id=5b0e2c1a-7d4f-4c2b-9a61-2f8e3d4c5b6a", headers={"X-API-Key": os.environ["RECOVAI_API_KEY"]}, timeout=60,)data = r.json()if not r.ok: raise RuntimeError(f"{data['error']}: {data.get('details', '')}")Response 200 OK
Section titled “Response 200 OK”{ "tasks": [ { "id": "d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70", "title": "Request September bank statement", "description": null, "status": "open", "priority": "normal", "source": "manual", "case_id": "5b0e2c1a-7d4f-4c2b-9a61-2f8e3d4c5b6a", "assigned_to": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f", "assignee": { "id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f", "name": "Sam Example", "email": "sam@example.com" }, "creator": null, "policy": null, "due_at": "2026-10-17T17:00:00.000Z", "snoozed_until": null, "completed_at": null, "sla_state": "on_track", "row_version": 1, "created_at": "2026-10-14T16:30:00.000Z" } ], "total": 1, "skip": 0, "take": 100, "has_more": false}sla_state is worked out when you ask: on_track, at_risk (past its warning time), breached (past due), snoozed, unscheduled (no due date), completed or cancelled. policy is the service-level policy that created the task, if any; creator is null for tasks created by an API key or by RecovAI.
Get a task
Section titled “Get a task”/tasks/{id}Read onlyAPI keyExample
Section titled “Example”curl https://api.recovai.ai/tasks/d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70 \ -H "X-API-Key: $RECOVAI_API_KEY"<?php$ch = curl_init('https://api.recovai.ai/tasks/d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('RECOVAI_API_KEY')],]);$body = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);curl_close($ch);
$result = json_decode($body, true);if ($status >= 400) { throw new RuntimeException($result['error'] . ': ' . ($result['details'] ?? ''));}const res = await fetch('https://api.recovai.ai/tasks/d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70', { method: 'GET', headers: { 'X-API-Key': process.env.RECOVAI_API_KEY },});const data = await res.json();if (!res.ok) throw new Error(`${data.error}: ${data.details ?? ''}`);import osimport requests
r = requests.get( "https://api.recovai.ai/tasks/d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70", headers={"X-API-Key": os.environ["RECOVAI_API_KEY"]}, timeout=60,)data = r.json()if not r.ok: raise RuntimeError(f"{data['error']}: {data.get('details', '')}")Returns { "task": { ... }, "history": [ ... ] }, where history lists the changes made to the task.
Create a task
Section titled “Create a task”/tasksChanges dataAPI key| Field | Type | Required | Description |
|---|---|---|---|
title |
string | yes | 1–200 characters. |
description |
string or null | Up to 4,000 characters. | |
case_id |
UUID or null | The case this task is about. | |
assigned_to |
UUID or null | Who should do it. | |
priority |
string | low, normal (default), high or urgent. |
|
due_at |
timestamp or null | When it is due. |
curl https://api.recovai.ai/tasks \ -H "X-API-Key: $RECOVAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "title": "Request September bank statement", "case_id": "5b0e2c1a-7d4f-4c2b-9a61-2f8e3d4c5b6a", "due_at": "2026-10-17T17:00:00Z" }'<?php$ch = curl_init('https://api.recovai.ai/tasks');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode([ 'title' => 'Request September bank statement', 'case_id' => '5b0e2c1a-7d4f-4c2b-9a61-2f8e3d4c5b6a', 'due_at' => '2026-10-17T17:00:00Z', ]), CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('RECOVAI_API_KEY'), 'Content-Type: application/json'],]);$body = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);curl_close($ch);
$result = json_decode($body, true);if ($status >= 400) { throw new RuntimeException($result['error'] . ': ' . ($result['details'] ?? ''));}const res = await fetch('https://api.recovai.ai/tasks', { method: 'POST', headers: { 'X-API-Key': process.env.RECOVAI_API_KEY, 'Content-Type': 'application/json' }, body: JSON.stringify({ "title": "Request September bank statement", "case_id": "5b0e2c1a-7d4f-4c2b-9a61-2f8e3d4c5b6a", "due_at": "2026-10-17T17:00:00Z" }),});const data = await res.json();if (!res.ok) throw new Error(`${data.error}: ${data.details ?? ''}`);import osimport requests
r = requests.post( "https://api.recovai.ai/tasks", headers={"X-API-Key": os.environ["RECOVAI_API_KEY"]}, json={ "title": "Request September bank statement", "case_id": "5b0e2c1a-7d4f-4c2b-9a61-2f8e3d4c5b6a", "due_at": "2026-10-17T17:00:00Z", }, timeout=60,)data = r.json()if not r.ok: raise RuntimeError(f"{data['error']}: {data.get('details', '')}")Returns 201 Created with { "task": { ... } }.
Errors
Section titled “Errors”400 invalid_case (not a case in your workspace), 400 invalid_assignee (not an active teammate who can work cases), 422 validation_error.
Update a task
Section titled “Update a task”/tasks/{id}Changes dataAPI key| Field | Type | Description |
|---|---|---|
expected_row_version |
integer | Required. The task’s row_version when you read it. |
title, description, priority, assigned_to, due_at |
As in Create a task. | |
status |
string | open, in_progress, completed or cancelled. |
snoozed_until |
timestamp or null | Hide the task until then. |
Send at least one change besides expected_row_version.
curl -X PATCH https://api.recovai.ai/tasks/d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70 \ -H "X-API-Key: $RECOVAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "expected_row_version": 1, "status": "completed" }'<?php$ch = curl_init('https://api.recovai.ai/tasks/d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'PATCH', CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode([ 'expected_row_version' => 1, 'status' => 'completed', ]), CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('RECOVAI_API_KEY'), 'Content-Type: application/json'],]);$body = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);curl_close($ch);
$result = json_decode($body, true);if ($status >= 400) { throw new RuntimeException($result['error'] . ': ' . ($result['details'] ?? ''));}const res = await fetch('https://api.recovai.ai/tasks/d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70', { method: 'PATCH', headers: { 'X-API-Key': process.env.RECOVAI_API_KEY, 'Content-Type': 'application/json' }, body: JSON.stringify({ "expected_row_version": 1, "status": "completed" }),});const data = await res.json();if (!res.ok) throw new Error(`${data.error}: ${data.details ?? ''}`);import osimport requests
r = requests.patch( "https://api.recovai.ai/tasks/d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70", headers={"X-API-Key": os.environ["RECOVAI_API_KEY"]}, json={ "expected_row_version": 1, "status": "completed", }, timeout=60,)data = r.json()if not r.ok: raise RuntimeError(f"{data['error']}: {data.get('details', '')}")Returns 200 OK with { "task": { ... } }. If the task changed since you read it you get 409 task_changed.