---
title: "Conventions"
summary: "The rules every endpoint follows: base URL, versioning, ids, pagination, filters, errors, idempotency, versions, rate limits, request ids and CORS."
updated: "2026-11-19"
url: "https://taskloader.com/docs/api"
---

> Documentation index: https://taskloader.com/llms.txt

# Conventions

The rules every endpoint follows: base URL, versioning, ids, pagination, filters, errors, idempotency, versions, rate limits, request ids and CORS.

Every endpoint of the Taskloader REST API follows the rules on this page, so the API reference only needs to describe what is particular to each one. The [quickstart](https://taskloader.com/docs/quickstart.md) shows the most important rules in five requests.

## Base URL

```text
https://taskloader.com/api/v1
```

In the guides, paths are relative to this base: `GET /me` means `GET https://taskloader.com/api/v1/me`. The API reference and the endpoint cards show the full path from the host instead, such as `GET /api/v1/me`. The API speaks HTTPS only.

Two addresses need no credential:

| Request                    | What it returns                                                                                                                                                                  |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `GET /api/v1`              | The index: the API `version`, and links to this documentation, the OpenAPI document, the MCP server and the [protected resource metadata](https://taskloader.com/docs/authentication/oauth.md#discovery). |
| `GET /api/v1/openapi.json` | The [OpenAPI 3.1.1 document](#openapi) for v1.                                                                                                                                   |

```json
{
  "object": "api",
  "version": "1.0.0",
  "documentation": "https://taskloader.com/docs/api",
  "openapi": "https://taskloader.com/api/v1/openapi.json",
  "mcp": "https://taskloader.com/mcp",
  "protectedResourceMetadata": "https://taskloader.com/.well-known/oauth-protected-resource/api/v1"
}
```

Every other request needs `Authorization: Bearer <token>`, with a personal API key (`tlk_…`) or an OAuth access token (`tlo_at_…`). See [Authentication](https://taskloader.com/docs/authentication.md).

## Versioning

The version is in the path. **v1 only grows**: new endpoints, new optional request fields, new response fields, new values in open lists and new error codes. Nothing is removed or renamed inside v1 without at least 6 months' notice (see [deprecations](#deprecations) below); anything else that would break clients ships as `/api/v2`.

Write clients that:

- ignore response fields they do not know;
- handle values they do not know in **open** lists, at least by skipping them;
- branch on the error `code`, never on `detail` or `title` text.

| Open (new values may appear in v1)                                                                         | Closed (a new value would mean v2)                                |
| ---------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| activity `kind`, event `type`, error `code`, `via.channel`, attachment `kind`, link preview `details.kind` | task `status`, task `priority`, project roles, organization roles |

**Breaking changes** ship as `/api/v2`. We announce v2 at least 6 months before it is generally available, and v1 keeps working for at least 12 months after that.

The OpenAPI document's `info.version` follows semver for the v1 contract: a minor release adds things, a patch release fixes documentation.

### Deprecations

Anything removed from v1 is deprecated first, with at least 6 months' notice: a [changelog](https://taskloader.com/docs/changelog.md) entry, `deprecated: true` in the OpenAPI document, and these headers on every affected response:

```http
Deprecation: @1798761600
Sunset: Fri, 02 Jul 2027 00:00:00 GMT
Link: <https://taskloader.com/docs/changelog#2027-01-01>; rel="deprecation"
```

`Deprecation` is when it was announced, and `Sunset` the earliest date it may stop working.

## Requests and responses

- **JSON in UTF-8**, with `camelCase` field names. Send `Content-Type: application/json` with every JSON body.
- **Every resource has `object` and `id`.** `object` names the kind (`"task"`, `"project"`, `"list"`).
- **Nothing is left out.** A value that is not set is `null`, and an empty list is `[]`, so every field is always present. Descriptions are the exception: a task's or a project's description is never `null`, and one that is not set is `""`.
- **PATCH changes only what you send.** A field you leave out stays as it is, and `null` never means "unchanged". Set a task's description, assignee, due date or bookmark to `null` to clear it, and a project's description the same way; a cleared description reads `""`, and sending `""` clears it too. Lists are emptied with `[]`, such as a task's checklist. Fields that always have a value refuse `null`: a title, a status, a priority, a name, a slug. A PATCH that changes nothing returns the resource as it is, without a new version.
- **Text is plain.** Task titles and the names of projects and organizations are one line: no line breaks or other control characters, no line or paragraph separators (U+2028, U+2029), and no invisible text-direction controls (U+202A to U+202E, U+2066 to U+2069), which text pasted from right-to-left documents often carries; the direction marks U+200E, U+200F and U+061C are fine. A refusal of a title or a name says which character to remove (for example U+202E). Longer texts (descriptions, comments, checklist items, questions to the assistant) may hold line breaks and tabs but no other control characters, and every form of line break (`\r\n`, `\r`, `\v`, `\f`, U+0085, and the separators U+2028 and U+2029) is stored as `\n`. Spaces and line breaks around titles, names, comments, checklist items and questions to the assistant are removed before these rules apply, and such text must have at least one visible character: text made only of spaces and invisible characters (such as zero-width spaces and word joiners) is refused. A project's description also loses the spaces and line breaks around it; a task's description keeps them as sent. Text that breaks these rules is refused with `400 validation_failed`. So is text with half a character (a lone UTF-16 surrogate, as when an emoji is cut by UTF-16 code units): shorten text by whole characters (code points), as Taskloader's limits count them. And so is a NUL character (U+0000) anywhere, in a field, a search or a reference, because Taskloader cannot store or search for it.
- **Unknown request fields are refused** with `400 validation_failed`, so a typo never passes silently.
- **Bodies:** JSON bodies can be up to 1 MiB, nested up to 32 levels deep and holding up to 32,768 values and fields (far more than any input needs); others are refused with `400 invalid_request`. File uploads have their own limits (see [Files](https://taskloader.com/docs/api/files.md)). Compressed request bodies (`Content-Encoding`) are refused with `415 unsupported_media_type`; responses from 1 KiB to 4 MiB are gzip-compressed when you send `Accept-Encoding: gzip` (larger ones are sent as they are).
- **Timestamps** are RFC 3339 in UTC with milliseconds: `2026-11-18T10:00:00.123Z`. **Calendar dates**, such as a due date, are `YYYY-MM-DD`.

### Today and time zones

Overdue, due-soon, trend and activity-range answers depend on what "today" is for the person asking. Operations that compute them accept:

- `today`: the caller's current date, `YYYY-MM-DD`. It must be within a day of the server's UTC date, which every time zone is.
- `timeZone`: an IANA time zone name, such as `Europe/Berlin`. Legacy names such as `IST` mean the zone browsers mean by them.

`today` wins when you send both. With neither, the UTC date is used. Insight answers ([`count_tasks`](https://taskloader.com/docs/api/reference/insights.md#count_tasks), [`weekly_trend`](https://taskloader.com/docs/api/reference/insights.md#weekly_trend), [`project_overview`](https://taskloader.com/docs/api/reference/insights.md#project_overview)) and task searches ([`search_tasks`](https://taskloader.com/docs/api/reference/tasks.md#search_tasks), [`search_tasks_everywhere`](https://taskloader.com/docs/api/reference/tasks.md#search_tasks_everywhere)) echo the `today` they used. [`list_project_activity`](https://taskloader.com/docs/api/reference/activity.md#list_project_activity) takes `timeZone` only, for the dates in its time range.

## Ids, keys and references

### Ids

An id is a prefix naming the resource, then (for most resources) 32 lowercase hex digits: `task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718`. Treat ids as opaque strings.

| Resource               | Prefix                       | Resource                   | Prefix                      |
| ---------------------- | ---------------------------- | -------------------------- | --------------------------- |
| Organization           | `org_`                       | Attachment, and its upload | `att_`                      |
| Project                | `prj_`                       | Link preview               | `lnk_`                      |
| Project member         | `mem_`                       | Invitation                 | `inv_`                      |
| User                   | `usr_` (then the account id) | Assistant thread           | `thr_`                      |
| Task                   | `task_`                      | Assistant message          | `msg_`                      |
| Checklist item         | `chk_`                       | Event (changes feed)       | `evt_` (then a number)      |
| Comment                | `cmt_`                       | Activity entry             | `act_`                      |
| API key (in `GET /me`) | `key_`                       | Request                    | `req_` (then 26 characters) |

A comment is an activity entry of kind `comment`, so `cmt_X` and `act_X` name the same entry. A `cmt_` id only ever resolves to a comment.

In the path, a well-formed id of the wrong kind (a project id where a task id belongs) gets `400 invalid_id`, and `detail` says what was expected; a value that is no id at all gets `404 not_found`, like a missing resource. In a body or query field, a well-formed id of the wrong kind gets `400 invalid_id` when the field takes only that one kind of id; anything else that is not a valid value, a malformed id included, gets `400 validation_failed` with a `pointer` to the field.

### Task keys

Each task also has a **key** such as `TL-012`, the one people see in the app. Keys are unique only within a project, so the API accepts a key only together with its project:

```http
GET /projects/prj_f88e6947efdde102d9c7a2d045b244b5/tasks/TL-012
```

Keys are case-insensitive and leading zeros are optional on input (`tl-12` works). Responses always use the canonical form (`TL-012`, `TL-1234`). Treat keys as display labels: use `number` if you need the number, and `id` to store a reference.

### References and URLs

Projects and tasks also carry a human `ref` and the `url` of their page in the app:

|         | `ref`                             | `url`                                                    |
| ------- | --------------------------------- | -------------------------------------------------------- |
| Project | `northwind/website-launch`        | `https://taskloader.com/northwind/website-launch`        |
| Task    | `northwind/website-launch/TL-012` | `https://taskloader.com/northwind/website-launch/TL-012` |

`GET /resolve?ref=…` turns a ref, a Taskloader URL (old links that still redirect in the app included), an id or a project's exact name into the organization, project and task it names. Use it when a person pastes a link into your integration. It resolves only projects you are in, and anything else answers `404`, exactly like a wrong id. A bare key such as `TL-12`, or a name several projects share, answers `400 validation_failed` with `matches` listing the candidates: keys are unique only inside a project.

### Members and users

A **user** (`usr_…`) is a person. A **member** (`mem_…`) is that person's membership in one project, with a role. Assignees are members, so task fields are named `assigneeMemberId`; organization roles and "add this person" take a `userId`. In task inputs, `"assigneeMemberId": "me"` means your own membership in that project.

### Operation names

Every endpoint has an operation name, such as [`update_task`](https://taskloader.com/docs/api/reference/tasks.md#update_task). It anchors the endpoint's entry in the API reference (`/docs/api/reference/tasks#update_task`), it is the endpoint's `operationId` in the [OpenAPI document](#openapi), and it is usually the name of the matching MCP tool too. Outside the MCP pages, the docs name endpoints that way, and each name links to its reference entry.

## Pagination

Lists return one page at a time:

```json
{
  "object": "list",
  "data": [{ "object": "task", "id": "task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718", "…": "…" }],
  "hasMore": true,
  "nextCursor": "eyJ2IjoxLCJvIjoic2VhcmNoX3Rhc2tzIiwi…",
  "total": 132
}
```

- `limit` sets the page size: 1 to 100, 50 by default (25 for the same lists over MCP). The changes feed allows up to 200.
- A page can hold fewer items than `limit` while `hasMore` is `true`: a task search's page stops at about 2 MiB of text (titles, descriptions, checklists and links), so a page of long tasks holds fewer of them. Keep following `nextCursor` until `hasMore` is `false`; never take a short page for the last one.
- Pass `nextCursor` back as `cursor` (on the [changes feed](https://taskloader.com/docs/api/changes-feed.md), as `after`) with **the same filters and sort** to get the next page. When `hasMore` is `false`, `nextCursor` is `null`, except on the changes feed, which always returns one to continue from.
- The `Link: <…>; rel="next"` header carries the same next-page URL.
- Cursors are opaque and signed. Do not build or edit them. A cursor from another list, another sort or other filters is refused with `400 invalid_cursor`: start again without `cursor` when you change filters.
- Cursors do not expire, except on the [changes feed](https://taskloader.com/docs/api/changes-feed.md), where they last 7 days.
- Paging is keyset-based, so a task created or deleted elsewhere never shifts your pages. A task whose sort value changes while you page (its `updatedAt`, say) can move past your position. To keep a copy in sync, follow the [changes feed](https://taskloader.com/docs/api/changes-feed.md).
- Task searches, project lists and project member lists include `total`, the number of matches, and `totalIsLowerBound`. Past 10,000 it stops counting: `"total": 10000, "totalIsLowerBound": true`.
- Each list has a fixed order, ended by id: projects and organizations oldest first; members the owner first, then by when they joined; invitations newest first; candidates by name; link previews in a stable order with no meaning.

## Filtering and sorting

Task searches (`GET /projects/{projectId}/tasks`, and `GET /tasks` across every project you can see) take these filters. Lists of values are comma-separated: `status=backlog,progress`.

| Parameter                        | Matches                                                                                                                                                                                                                                                                                                                      |
| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `q`                              | Up to 10 words (over MCP and in the in-app assistant, a sentence of up to 40 words, of which the first 10 other than common words are searched). Every word must appear, ignoring case, somewhere in the title or the description. A key such as TL-12 finds only tasks that mention it; use `keys` to find the task itself. |
| `status`                         | Any of `backlog`, `progress`, `review`, `done`.                                                                                                                                                                                                                                                                              |
| `priority`                       | Any of `low`, `normal`, `high`, `urgent`.                                                                                                                                                                                                                                                                                    |
| `assigneeMemberId`               | Up to 50 of: a member id, `me`, or `unassigned`.                                                                                                                                                                                                                                                                             |
| `dueBefore`, `dueAfter`          | Due on or before / on or after a date. Tasks without a due date never match.                                                                                                                                                                                                                                                 |
| `overdue=true`                   | Open tasks due before today.                                                                                                                                                                                                                                                                                                 |
| `dueSoon=true`                   | Open tasks due between today and 7 days from today.                                                                                                                                                                                                                                                                          |
| `keys`                           | Up to 50 task keys: `keys=TL-1,TL-5`.                                                                                                                                                                                                                                                                                        |
| `updatedSince`, `completedSince` | Changed or completed at or after an RFC 3339 time.                                                                                                                                                                                                                                                                           |
| `createdBy`                      | A user id, or `me`.                                                                                                                                                                                                                                                                                                          |
| `bookmark`                       | `true` for tasks that bookmark a web page, `false` for the rest.                                                                                                                                                                                                                                                             |
| `projectId`, `organizationId`    | `GET /tasks` only: limit the search to some projects or one organization.                                                                                                                                                                                                                                                    |

"Open" means any status except `done`. Overdue and due-soon use [today](#today-and-time-zones).

A search with words (`q`) reads every task in its scope, so it has a time limit: each of its queries may take up to 2 seconds in the database. A search that needs longer, usually a rare word across thousands of long tasks, gets `422 search_too_broad`. Narrow it with other filters (`status`, `assigneeMemberId`, due dates, one project instead of all) or more specific words, then search again; sending the same search again fails the same way. [`count_tasks`](https://taskloader.com/docs/api/reference/insights.md#count_tasks) and [`weekly_trend`](https://taskloader.com/docs/api/reference/insights.md#weekly_trend) with `q` have the same limit. Your searches with words also take turns: two run at a time, up to eight more wait for them, and past that a search gets `429 rate_limited` with `Retry-After`.

`sort` takes a field, or `-field` for descending order. Ties are broken by id, so the order is always stable.

| `sort`                               | Order                                                                         |
| ------------------------------------ | ----------------------------------------------------------------------------- |
| `position`                           | Board order. The default for one project.                                     |
| `dueDate`                            | Earliest due first; tasks without a due date last; then by priority.          |
| `priority`                           | Urgent first, then by due date.                                               |
| `updatedAt`                          | Oldest change first. `GET /tasks` defaults to `-updatedAt`, the latest first. |
| `createdAt`, `number`, `completedAt` | As named.                                                                     |
| `status`                             | Backlog to done, then by due date.                                            |

## Errors

Every error is an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem with `Content-Type: application/problem+json`:

```http
HTTP/1.1 412 Precondition Failed
Content-Type: application/problem+json
Request-Id: req_01JD3Q4S9V0M6T2H8K5N7P1RXA
ETag: "8"
```

```json
{
  "type": "https://taskloader.com/docs/api/errors#version_conflict",
  "title": "The resource changed since you read it",
  "status": 412,
  "code": "version_conflict",
  "detail": "TL-012 is at version 8. You sent version 7. Nothing was changed. Read the task, check the change still makes sense, and retry with version 8 (over HTTP, If-Match: \"8\" works too).",
  "instance": "/api/v1/tasks/task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
  "requestId": "req_01JD3Q4S9V0M6T2H8K5N7P1RXA",
  "currentVersion": 8,
  "current": {
    "object": "task",
    "id": "task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
    "version": 8,
    "…": "…"
  }
}
```

| Member      | Meaning                                                                                                     |
| ----------- | ----------------------------------------------------------------------------------------------------------- |
| `code`      | The stable, machine-readable reason. **Branch on this.**                                                    |
| `status`    | The HTTP status, repeated.                                                                                  |
| `title`     | A fixed, short description of the code.                                                                     |
| `detail`    | What happened this time and what to do, in plain English. It may change; show it to people, never parse it. |
| `type`      | A link to the code's entry in the [error reference](https://taskloader.com/docs/api/errors.md).                                      |
| `instance`  | The request path, without the query string.                                                                 |
| `requestId` | Quote it when you contact us (contact@taskloader.com) about a request.                                      |

Some codes add members, such as `currentVersion` and `current` above, `requiredScopes`, or `retryAfter`. The error reference lists them per code. Ignore members you do not know.

Invalid input gets `400 validation_failed` with one entry per problem in `errors` (a request that is not valid as a whole says "The request is not valid. See errors for details."). `errors` lists at most 20 problems: when there are more, `moreErrors` counts the rest and `detail` says so. The value you sent is never repeated back, in case it was a secret pasted into the wrong field:

```json
{
  "code": "validation_failed",
  "detail": "2 fields are not valid. See errors for details.",
  "errors": [
    {
      "pointer": "/title",
      "code": "custom",
      "detail": "A title can be up to 180 characters. Put the rest in the description."
    },
    {
      "pointer": "/priority",
      "code": "invalid_value",
      "detail": "This must be one of: \"low\", \"normal\", \"high\", \"urgent\"."
    }
  ],
  "…": "…"
}
```

Each entry's `pointer` (RFC 6901) names the field, and `detail` says what is wrong with it in words you can show. `code` is the kind of problem, such as `too_big`, `invalid_value`, `unrecognized_key`, or `custom` for a rule particular to that field.

How statuses are used:

| Status        | Means                                                                                                                                                                                                                                    |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 400           | The request is malformed or invalid. Fix it; sending it again fails the same way.                                                                                                                                                        |
| 401           | No credential, or one that is invalid, expired or revoked. See [Authentication](https://taskloader.com/docs/authentication.md#when-authentication-fails).                                                                                                         |
| 403           | The credential lacks a scope, is limited to other projects, or your role does not allow this.                                                                                                                                            |
| 404           | It does not exist **or you cannot see it**. The two are deliberately the same, so ids of other people's projects reveal nothing.                                                                                                         |
| 409           | The current state does not allow it (already a member, an upload with missing parts).                                                                                                                                                    |
| 410           | A changes-feed cursor is older than the feed keeps.                                                                                                                                                                                      |
| 412           | The resource changed since you read it. See [Versions](#versions-and-etags).                                                                                                                                                             |
| 413, 415, 416 | Body too large, wrong media type, range outside the file.                                                                                                                                                                                |
| 422           | The request is well-formed but breaks a rule (the assignee is not a project member).                                                                                                                                                     |
| 428           | This change needs the version you read.                                                                                                                                                                                                  |
| 429           | A limit was reached. For request limits, wait `Retry-After` seconds; some caps need you to act first. See [Rate limits](#rate-limits).                                                                                                   |
| 500           | Something went wrong on our side. Retry; quote `requestId` if it keeps happening.                                                                                                                                                        |
| 503           | Taskloader or its file storage is briefly unavailable: wait `Retry-After` seconds when it is sent, otherwise back off. The exception is `assistant_unavailable`: the assistant is not set up on this server, and retrying does not help. |

The [error reference](https://taskloader.com/docs/api/errors.md) lists every code with its status, members, whether a retry can help, and what to do.

## Idempotency

Networks fail after a request was sent and before its answer arrived. To retry such a request safely, send an `Idempotency-Key` header with every request that changes something (`POST`, `PATCH`, `PUT`, `DELETE`). Use a new random UUID for each new change, and the same one for every retry of that change.

```bash
curl https://taskloader.com/api/v1/projects/prj_f88e6947efdde102d9c7a2d045b244b5/tasks \
  -H "Authorization: Bearer $TASKLOADER_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 6f1c2b8e-3d4a-4f5b-9c6d-7e8f9a0b1c2d" \
  -d '{"title":"Write launch announcement"}'
```

The policy:

- **Value:** 1 to 255 printable ASCII characters. A malformed key is refused with `400 invalid_idempotency_key` on any write, so you never believe you have protection you lack. `GET` requests ignore the header.
- **Scope:** keys belong to the credential that sent them (one API key, or one person and one connected app). Two credentials can use the same key without meeting.
- **Lifetime:** 24 hours from the first request.
- **Same key, same request:** you get the first answer again, its status and its body (rebuilt in the two cases below, **Fewer scopes** and **Large answers**), with `Idempotent-Replayed: true`. Nothing is done twice. "Same request" means the same operation with the same input, including the version you sent and, for uploads, the same bytes.
- **Access is checked again:** a retry is answered only while you can still see what the request named (its project, task, organization or assistant conversation). After you are removed from the project, or an app's projects are narrowed in Connected apps, a retry answers `404 not_found` like any other request, and nothing runs again. Two kinds of request are not checked, and their retries still get the first answer, which concerns only you: leaving a project or an organization ([`leave_project`](https://taskloader.com/docs/api/reference/projects.md#leave_project), [`leave_organization`](https://taskloader.com/docs/api/reference/organizations.md#leave_organization)), and requests that name none of those ([`create_organization`](https://taskloader.com/docs/api/reference/organizations.md#create_organization), [`accept_invitation`](https://taskloader.com/docs/api/reference/invitations.md#accept_invitation), [`delete_attachment`](https://taskloader.com/docs/api/reference/files.md#delete_attachment), [`cancel_upload`](https://taskloader.com/docs/api/reference/files.md#cancel_upload)).
- **Fewer scopes:** after an app is reconnected with fewer scopes, a retry gets the answer as those scopes show it: a success is rebuilt from what the request made, as it is now ([`create_tasks`](https://taskloader.com/docs/api/reference/tasks.md#create_tasks) keeps its first answer, which shows nothing that depends on scopes), and a failure keeps its code and members, with the general `detail` of its code.
- **Same key, still running:** `409 idempotency_key_in_progress` with `Retry-After: 1`. Retry with the same key.
- **Same key, different request:** `422 idempotency_key_reused`. Use a new key.
- **What is kept:** successful answers, and failures that a retry cannot change (`404`, `409`, `412`, `422`). Not kept, so a retry runs again: malformed requests (`400`), authentication and scope failures (`401`, `403`), limits (`429`), server errors (`5xx`, where nothing was saved), and failures that ask you to come back later (`assistant_busy`, `upload_incomplete`).
- **Large answers:** an answer over 256 KiB is not stored. A retry rebuilds it from what the request created, as it is now, just as it does when Taskloader stopped between the change and its answer. [`create_tasks`](https://taskloader.com/docs/api/reference/tasks.md#create_tasks) stores its answer whatever its size, so a retry gives exactly the first one. A rebuilt answer never leaves anything out: if something it would show was deleted since, the retry answers `404 not_found` and names it (for a batch: "Task 6 of the batch (TL-031) was deleted after the batch created it, …").
- **Uploads:** a file upload sent with `Idempotency-Key` must also send `Content-Digest: sha-256=:<base64 of the SHA-256 of the body>:`. Without it you get `400 invalid_request`. See [Files](https://taskloader.com/docs/api/files.md#retrying-uploads).

Requests that create something, add a member, comment, edit a checklist, join or leave, remove someone, accept an invitation, upload or delete a file, cancel an upload, ask the assistant, or apply or dismiss its changes record the result under the key, exactly once, in the same transaction as the change.

Changes that need a version ([`update_task`](https://taskloader.com/docs/api/reference/tasks.md#update_task), [`move_task`](https://taskloader.com/docs/api/reference/tasks.md#move_task), [`delete_task`](https://taskloader.com/docs/api/reference/tasks.md#delete_task), [`remove_bookmark`](https://taskloader.com/docs/api/reference/bookmarks.md#remove_bookmark), [`update_project`](https://taskloader.com/docs/api/reference/projects.md#update_project), [`update_organization`](https://taskloader.com/docs/api/reference/organizations.md#update_organization)) are protected by the version instead. If the answer to one of them was lost and you retry it, you may get `412 version_conflict`. Compare its `current` with your change: if it already shows your change, you are done; if not (someone else changed it, or your first request never arrived), decide again and resend with `current.version`. A retried [`delete_task`](https://taskloader.com/docs/api/reference/tasks.md#delete_task) that already went through answers `404 not_found`. Setting a role, revoking an invitation and similar changes give the same result however often you send them.

Removing someone, leaving, deleting a file ([`delete_attachment`](https://taskloader.com/docs/api/reference/files.md#delete_attachment)) and canceling an upload ([`cancel_upload`](https://taskloader.com/docs/api/reference/files.md#cancel_upload)) honour `Idempotency-Key` too: with a key, a retry gets the first answer back; without one, a retry after the change went through answers `404`.

An invitation link's `token` and `url` are shown once, in the answer to its creation, and never stored with the key: a retry with the same key answers `201` with `Idempotent-Replayed: true` but without them. If that happens, revoke that link and create another.

## Versions and ETags

Tasks, projects and organizations have an integer `version` that goes up with every change. A change answers with the new version as a strong `ETag`, and a `412` with the current one:

```http
ETag: "8"
```

A read of one task, project or organization answers with a weak `ETag`: the version, then a digest of the answer:

```http
ETag: W/"8-3f2a9c1d0b7e"
```

Changes to them **require the version you read**, so nobody overwrites someone else's change without seeing it. Send it as `If-Match`, either as `"<version>"` or as the `ETag` of your read exactly as you got it; only the version is compared:

```bash
curl -X PATCH https://taskloader.com/api/v1/tasks/task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718 \
  -H "Authorization: Bearer $TASKLOADER_API_KEY" \
  -H "Content-Type: application/json" \
  -H 'If-Match: "8"' \
  -d '{"status":"review"}'
```

or as `version` in the JSON body. Deletes, which have no body, take `If-Match` or `?version=8`.

| You send                                    | You get                                                                                             |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| The current version                         | The change, and the new version in the body and `ETag`.                                             |
| An older version                            | `412 version_conflict` with `currentVersion` and the whole `current` resource. Nothing was changed. |
| No version                                  | `428 precondition_required`.                                                                        |
| `If-Match: *`                               | `428 precondition_required`. A version is always needed.                                            |
| `If-Match` and a body `version` that differ | `400 invalid_request`.                                                                              |

Operations that require a version: [`update_task`](https://taskloader.com/docs/api/reference/tasks.md#update_task), [`move_task`](https://taskloader.com/docs/api/reference/tasks.md#move_task), [`delete_task`](https://taskloader.com/docs/api/reference/tasks.md#delete_task), [`remove_bookmark`](https://taskloader.com/docs/api/reference/bookmarks.md#remove_bookmark), [`update_project`](https://taskloader.com/docs/api/reference/projects.md#update_project) and [`update_organization`](https://taskloader.com/docs/api/reference/organizations.md#update_organization). [`edit_checklist`](https://taskloader.com/docs/api/reference/tasks.md#edit_checklist) takes an optional `version`, checked when you send it: its item operations lock the task and merge with other people's edits. Comments, files, roles and invitations have no version.

The `version` stands for what people edit. Computed fields can change without it: an assignee's display name, a task's `attachmentCount` when a file is attached or deleted, its bookmark's `preview` when Taskloader reads the page again, a `ref` and `url` when a project's or organization's slug changes, and your own role. A change you send with the version you hold still goes through after them. A read's `ETag` changes with them too (see [Caching](#caching)).

When you get a 412, look at `current`, check that your change still makes sense, and send it again with `current.version`. [Conflicts and retries](https://taskloader.com/docs/guides/conflicts-and-retries.md) shows the loop in code.

## Caching

- JSON responses carry `Cache-Control: no-store`, except the index and the OpenAPI document, which may be cached for 5 minutes.
- To poll a single task, project or organization, send the `ETag` of your last read (`W/"8-3f2a9c1d0b7e"`) as `If-None-Match`. While nothing in that answer has changed, computed fields included, you get `304 Not Modified` with no body. Send the `ETag` back exactly as you got it: the version alone (`If-None-Match: "8"`) never matches a read. To follow many tasks, use the [changes feed](https://taskloader.com/docs/api/changes-feed.md).
- A task read with `include` carries no `ETag` and never answers `304`: its comments, history and files can change without its version.

## Rate limits

Limits keep Taskloader fast for everyone. Each request counts against:

- your **personal** limit, shared by all your keys and connected apps, so many keys do not multiply it; an MCP request counts as half a request;
- one **per-credential** limit for its kind of request: reads, writes or searches (`q`, cross-project search, insights, the overview, the changes feed with `wait`, and reading the assistant's answers);
- over MCP, the connection's **MCP limit**, which every MCP request counts against, `tools/list` included. It takes the place of the read limit: only a resource read, listing or completion that reads more than once counts its further reads as reads. A tool that writes, searches or uploads also counts against the write, search or upload limit. Past the MCP limit or your personal limit the MCP server answers HTTP `429` with `Retry-After`; past a write, search or upload limit, the tool returns a `rate_limited` error with `retryAfterSeconds`;
- for file uploads and upload parts, a **per-person** upload limit instead of the per-credential one, shared by all your credentials;
- for a few operations, a **cap**: organizations, projects and invitations created per day, and assistant questions per hour.

There are two kinds of limit:

- **Rates**, such as reads per minute, allow a sustained rate plus a burst on top.
- **Caps** are true maximums. A cap of N per window allows **at most N in any window, and at most N/2 at once**; the rest comes back gradually. For example, you can create at most 10 organizations through the API and MCP in any 24 hours, and at most 5 of them at once.

| Limit | Allowance | Counted per |
|---|---|---|
| Every request of a person, except through signed links (an MCP request counts as half a request) | 1,500 a minute, bursts of up to 300 | person, across all their credentials |
| Reads through the REST API, and each further read of an MCP resource, listing or completion that reads more than once | 600 a minute, bursts of up to 120 | credential |
| Writes | 120 a minute, bursts of up to 30 | credential |
| Text searches (`q`), search across projects, insights and the overview, long-polls, and reads of assistant answers | 120 a minute, bursts of up to 30 | credential |
| File uploads and parts | 300 an hour, bursts of up to 50 | person |
| Every MCP request, `tools/list` included | 1,200 a minute, bursts of up to 240 | credential |
| Downloads and images through signed links, instead of the read and personal limits | 600 a minute, bursts of up to 200 | credential and address |
| Questions to the assistant | At most 30 in any hour, at most 15 at once | credential |
| New organizations | At most 10 in any 24 hours, at most 5 at once | person |
| New projects | At most 50 in any 24 hours, at most 25 at once | person |
| New invitations | At most 100 in any 24 hours, at most 50 at once | person |

Every authenticated `/api/v1` response carries the limit closest to running out, in the IETF `RateLimit` header format. Over MCP, only the HTTP `429` for the MCP limit or your personal limit carries these headers. After three writes in a row, for example:

```http
RateLimit-Policy: "write";q=120;w=60
RateLimit: "write";r=27;t=2
```

`q` is the quota and `w` the window in seconds; `r` is how many requests you can send right now, and `t` the seconds until the limit is full again. `r` is never more than the limit's burst in the table above (30 for writes), however large `q` is.

When a request limit or a daily cap is reached you get `429` with `Retry-After` (always authoritative) and a problem: `rate_limited` names the `bucket`; `daily_limit_reached` names the `limit`. Wait `Retry-After` seconds, then continue. Do not retry sooner: the request will fail again.

Requests also take turns. Each credential has up to 4 requests running at once; up to 32 more wait their turn, and past that a request gets `429 rate_limited` with `"bucket": "in_flight"` and `Retry-After`. Text searches take turns too: 2 of yours at a time (`"bucket": "search_in_flight"`). When Taskloader as a whole is too busy to serve a request within 10 seconds, it answers `503 service_unavailable` with `Retry-After`. Send requests one after another, or a few at a time, rather than in large bursts.

A few limits have their own codes:

- `assistant_hourly_limit`: questions per person per hour, across every app. It carries `Retry-After`.
- `too_many_open_uploads`: unfinished uploads per person. There is no `Retry-After`: complete or cancel an upload, then try again.
- `too_many_transfers`: file downloads and uploads under way at once per person. It carries `Retry-After`.
- `storage_quota_exceeded` (`413`): the files stored per person or per organization. There is no `Retry-After`: delete files first.
- `too_many_invitations`: active invitation links per project or organization. There is no `Retry-After`, and waiting does not help: revoke an unused link first.
- `too_many_projects`: projects one person can be in (1,000). There is no `Retry-After`, and waiting does not help: the person leaves a project they no longer need first.

The [limits page](https://taskloader.com/docs/api/limits.md) lists every limit, with the sizes of bodies, fields, files and lists.

Requests without any credential always get their `401`, so sign-in can start; only an extreme flood from one address is limited. Tokens that are sent but fail to verify count against a per-address limit. A valid credential is never refused because someone else at the same address sent bad tokens.

The numbers are starting points and may change. Read the headers instead of hard-coding them.

## Request ids

Every response, errors included, carries a `Request-Id` header such as `req_01JD3Q4S9V0M6T2H8K5N7P1RXA`, and every problem repeats it as `requestId`. Log it with failures and quote it when you ask us about a request.

Taskloader makes its own ids and never adopts yours. If you send a W3C `traceparent` header, its trace id is recorded with the request so you can match our logs to your traces.

## CORS

`/api/v1` answers requests from any origin (`Access-Control-Allow-Origin: *`). That is safe because the API never reads cookies: a request is authorized only by its `Authorization` header, so a web page cannot use a visitor's Taskloader session.

| Header                    | Values                                                                                                                                                                                                                                             |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Allowed request headers   | `Authorization`, `Content-Type`, `Content-Digest`, `Content-Disposition`, `Idempotency-Key`, `If-Match`, `If-None-Match`, `Range`, `traceparent`                                                                                                   |
| Readable response headers | `Request-Id`, `ETag`, `Location`, `Content-Location`, `Link`, `RateLimit`, `RateLimit-Policy`, `Retry-After`, `WWW-Authenticate`, `Idempotent-Replayed`, `Deprecation`, `Sunset`, `Content-Range`, `Content-Disposition`, `Accept-Ranges`, `Allow` |

Preflight answers may be cached for 10 minutes.

> **Note:** Never put an API key in code that runs in a browser or a mobile app: anyone can read it there. Browser and mobile apps should sign people in with [OAuth and PKCE](https://taskloader.com/docs/authentication/oauth.md) instead.

## Response headers

| Header                          | When                                                                                                                                                                                                                                                                                                                                        |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Request-Id`                    | Always.                                                                                                                                                                                                                                                                                                                                     |
| `ETag`                          | Responses with one task, project or organization: the new version after a change (`"8"`), the version and a digest of the answer on a read (`W/"8-3f2a9c1d0b7e"`); `412` responses (the current version).                                                                                                                                   |
| `Location`                      | `201` from creating an organization, project, task, attachment or upload: its address (for [`add_bookmark`](https://taskloader.com/docs/api/reference/bookmarks.md#add_bookmark), the task's). [`add_comment`](https://taskloader.com/docs/api/reference/comments.md#add_comment), [`create_tasks`](https://taskloader.com/docs/api/reference/tasks.md#create_tasks), [`add_project_member`](https://taskloader.com/docs/api/reference/people.md#add_project_member) and new invitation links answer without one. `202` from [`ask_assistant`](https://taskloader.com/docs/api/reference/assistant.md#ask_assistant): where to read the answer. All are paths from the host, such as `/api/v1/tasks/task_…`. |
| `Content-Location`              | A task read by key (`GET /projects/{projectId}/tasks/{taskKey}`): its address by id.                                                                                                                                                                                                                                                        |
| `Link`                          | Lists with a next page (`rel="next"`); deprecated endpoints (`rel="deprecation"`).                                                                                                                                                                                                                                                          |
| `RateLimit`, `RateLimit-Policy` | Authenticated `/api/v1` responses, for the limit closest to running out: a transport limit, or a daily cap or the assistant's limit when that is closer (also on its own `429`); every `429`.                                                                                                                                               |
| `Retry-After`                   | `429 rate_limited`, `daily_limit_reached`, `assistant_hourly_limit` and `too_many_transfers`; `503 service_unavailable` and `storage_unavailable`; `409 idempotency_key_in_progress`; assistant answers that are not ready yet.                                                                                                             |
| `Idempotent-Replayed: true`     | A stored answer to a retried `Idempotency-Key`: the first success, or the first `404`, `409`, `412` or `422`.                                                                                                                                                                                                                               |
| `WWW-Authenticate`              | `401`, and `403 insufficient_scope`.                                                                                                                                                                                                                                                                                                        |
| `Deprecation`, `Sunset`         | Endpoints scheduled for removal.                                                                                                                                                                                                                                                                                                            |

API responses also carry `X-Content-Type-Options: nosniff`, `X-Frame-Options: DENY`, `Referrer-Policy: no-referrer` and `X-Robots-Tag: noindex`.

## OpenAPI

The complete contract is an OpenAPI 3.1.1 document, generated from the same definitions the API runs on:

```bash
curl -O https://taskloader.com/api/v1/openapi.json
```

It describes every operation, schema, scope and error, with examples. Use it to generate clients: [Typed client](https://taskloader.com/docs/guides/typed-client.md) shows one for TypeScript. Each operation also carries:

| Extension                   | What it says                                                                                                                                                                                                                                                                                                                          |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `x-taskloader-min-role`     | Who may call it: `viewer`, `editor` or `admin` (that role or above), `member` (any member), `org_admin` (an organization admin or owner), `signed_in` (any signed-in person), `thread_owner` (the person who started the assistant conversation) or `uploader` (the person who started the upload).                                   |
| `x-taskloader-access-level` | Where that role is held: the `project`, the `organization`, the `thread` (your own assistant conversation, in its project) or the `account` (nothing beyond being signed in).                                                                                                                                                         |
| `x-taskloader-restriction`  | What a [project-limited credential](https://taskloader.com/docs/authentication.md#project-limited-credentials) may do: `project` (call it for one of its projects), `listing` (call it; results show only its projects), `organization_read` (call it for an organization that holds one of its projects) or `account` (nothing: `403 credential_restricted`). |
| `x-taskloader-rate-limits`  | Every limit it counts against besides your personal one: its `bucket`; `searchWhen`, the query parameters that make a request a search (`q` with words, `wait` above 0); its own `cap`; and `signedLinkBucket`, the only limit a request through a signed link counts against.                                                        |
| `x-taskloader-rate-class`   | A one-word summary of `x-taskloader-rate-limits`: its `cap` when it has one, otherwise its `bucket`. Read `x-taskloader-rate-limits` for every limit.                                                                                                                                                                                 |
| `x-taskloader-idempotency`  | How to retry it safely: `key` (send an `Idempotency-Key`), `version` (send `If-Match`), `natural` (sending it again changes nothing more) or `none` (a read).                                                                                                                                                                         |
| `x-taskloader-mcp-tool`     | The MCP tool that reaches it, where one does.                                                                                                                                                                                                                                                                                         |
