Source: https://docs.debitura.com/api/customer-api/tasks

# Tasks — Customer API

Base URL: `https://customer-api.debitura.com`

Authentication: `XApiKey` API key; see [authentication](https://docs.debitura.com/developer-concepts/authentication.md).

Generated from [OpenAPI](https://docs.debitura.com/openapi/customer-api.json). Examples are schema illustrations, not observed responses. Complete schemas, including recursive types, are in OpenAPI.

<a id="list-your-open-tasks"></a>

## List your open tasks

`GET /tasks`

Returns a paginated, account-wide list of every task (action-item) your account currently has — across ALL cases, not just one. Use GET /cases/{id}/tasks instead to scope this to a single case.

**What is a task?**
A task is something the platform needs YOU to do before a case can proceed — e.g. reply to a chat message, sign a contract, or assign a bank account for payouts. Tasks auto-resolve when the underlying condition clears (for example, once you reply to the case's chat, the ReplyToChat task disappears on its own) — this is a live work queue, not an append-only log. Poll it, don't assume a task you've seen before is still open.

**Every task has a solutionUrl** — an absolute link, identical to the one used inside the Creditor app itself, that a human can open to resolve the task in one click, no matter the task type.

**Some tasks also have an `action`** — a machine-readable hint pointing at the exact existing API call that resolves the task directly, with no human required. Today that's the chat-driven cluster (ReplyToChat, ClientInputRequired, MoreInfoNeeded) — post a message via POST /cases/{caseId}/chats and the task resolves itself once the case leaves its needs-info state. Tasks without an action are `action: null` — resolve those via solutionUrl.

**Some tasks also carry a `leadId`** — the lead the task is decided on. The quote-review tasks both mean a quote is waiting on YOUR decision: IncumbentLegalQuotePending — the partner already on the case has sent a legal-offer quote for you to approve or decline; ReviewQuotes — one or more quotes have arrived on the case's lead and you must choose how to proceed. The two never appear together on the same lead. Both are attached to a case, so they return `caseId` AND `leadId`, and their solutionUrl points at the lead rather than the case. The older SelectQuoteWinner task also carries a `leadId`, but is attached to the lead itself — so it has no `caseId` and never appears under GET /cases/{id}/tasks.

**Filtering:**
- status (default: Open) — Open or Solved
- type (repeatable, e.g. ?type=ReplyToChat&type=SignContract) — restrict to specific task types

**Pagination:**
- Page (default: 1), PageSize (default: 10, max: 100)

### Query parameters

- `status` (string): 
- `type` (array of strings): 
- `Page` (integer): 
- `PageSize` (integer): 

### Response 200

Tasks returned

- `page` (object, required): Stable v1 pagination metadata shared by public list responses.
- `page.totalResults` (integer): 
- `page.pageSize` (integer): 
- `page.currentPage` (integer): 
- `page.responseCount` (integer): 
- `page.totalPages` (integer): 
- `tasks` (array of objects, nullable): A creditor-facing action item ("task") — something the platform needs the client to do
before a case can proceed (e.g. reply to a chat, sign a contract, assign a bank account).
            
Every task carries a SolutionUrl — an absolute link identical to the one used
inside the Creditor app — so a human can resolve any task in one click, even task types that
are not yet directly API-actionable. Tasks that ARE directly API-actionable additionally carry
a non-null Action pointing at the exact API call that resolves them.
- `tasks[].id` (uuid): The task's unique ID.
- `tasks[].type` (string, nullable): Stable string code for the task type (e.g. `"ReplyToChat"`). This is the public,
additive-safe contract — it does NOT track the internal integer enum used in storage.
- `tasks[].typeLabel` (string, nullable): Human-readable label for Type (e.g. "Reply to chat").
- `tasks[].title` (string, nullable): Short task title, as shown in the Creditor app.
- `tasks[].description` (string, nullable): Optional longer description of what the task requires.
- `tasks[].status` (string, nullable): Either `"Open"` or `"Solved"`.
- `tasks[].caseId` (uuid, nullable): The case (collection case / invoice) this task belongs to, when applicable.
Null for account-level tasks not tied to a single case (e.g. SignContract, AssignBankAccount).
- `tasks[].caseReference` (string, nullable): Your reference for CaseId, if any.
- `tasks[].leadId` (uuid, nullable): The lead this task belongs to, if any. Populated for lead-scoped tasks, and for the
quote-review tasks (`IncumbentLegalQuotePending`, `ReviewQuotes`) — which are
attached to a case but decided on the lead, so those carry both `caseId` and
`leadId`, and their `solutionUrl` points at the lead. Null for every other
task type. On the rare quote-review row with no lead recorded, `leadId` is null and
`solutionUrl` falls back to the case page — the two never disagree.
- `tasks[].deadline` (datetime, nullable): When this task is due, if a deadline is set.
- `tasks[].dateCreated` (datetime): When the task was created.
- `tasks[].dateSolved` (datetime, nullable): When the task was resolved, if it has been.
- `tasks[].solutionUrl` (string, nullable): Absolute URL — identical to the one the Creditor app itself links to — where a human can
resolve this task. Always present, regardless of whether Action is populated.
- `tasks[].action` (object): A machine-readable hint pointing at the existing API call that resolves a task, e.g.
`{ "method": "POST", "path": "/cases/{caseId}/chats" }` for a chat-driven task.
            
Path uses the same `{param}` placeholder style as this API's own
documented routes — substitute in the real IDs before calling.
- `tasks[].action.method` (string, nullable): HTTP method to use, e.g. `"POST"`.
- `tasks[].action.path` (string, nullable): Path template for the resolving call, e.g. `"/cases/{caseId}/chats"`.
Relative to the API's base URL.

```json
{
  "page": {
    "totalResults": 42,
    "pageSize": 25,
    "currentPage": 1,
    "responseCount": 42,
    "totalPages": 1
  },
  "tasks": [
    {
      "id": "3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31",
      "type": "string",
      "typeLabel": "string",
      "title": "string",
      "description": "string",
      "status": "string",
      "caseId": "3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31",
      "caseReference": "INV-2026-0042",
      "leadId": "3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31",
      "deadline": "2026-10-01T14:05:00Z",
      "dateCreated": "2026-10-01T14:05:00Z",
      "dateSolved": "2026-10-01T14:05:00Z",
      "solutionUrl": "https://app.debitura.com/…",
      "action": {
        "method": "string",
        "path": "string"
      }
    }
  ]
}
```

### Response 400

Invalid status, type, or pagination parameters

- `error` (string, nullable): Short human-readable error label (legacy field — preserved for backward compatibility).
- `message` (string, nullable): Human-readable error description (legacy field — preserved for backward compatibility).
- `businessErrors` (array of objects, nullable): Canonical structured error array. Consumers should migrate to reading this field.
- `businessErrors[].type` (string, nullable): The type of business error (e.g., "MissingDebtCollectionContract", "MissingPowerOfAttorney", "NoPartnerAvailable").
- `businessErrors[].message` (string, nullable): A human-readable description of the error.
- `businessErrors[].solutionUrl` (string, nullable): A URL where the user can resolve this <i>specific</i> error (e.g., sign a contract).
            

Partners who want a <b>single URL</b> that walks the user through every pending
signing in one chain — instead of forwarding one URL per
`BusinessErrorApiDTO` — should use
SigningHandoff's `CombinedSigningUrl`.
The two are complementary: `SolutionUrl` is granular per-error;
`CombinedSigningUrl` is the chain-walking alternative for signing-related errors.

```json
{
  "error": null,
  "message": "Payment plan agreed with the debtor.",
  "businessErrors": [
    {
      "type": "string",
      "message": "Payment plan agreed with the debtor.",
      "solutionUrl": "https://app.debitura.com/…"
    }
  ]
}
```
