REST API
Conatus serves a versioned REST API at /api/v1, described by an OpenAPI 3.1
document at /api/v1/openapi.json. It is the same API the
MCP server and native clients use. There is no privileged
back channel.
Tokens
Section titled “Tokens”Create one in Settings → API tokens and choose its permissions, project access and expiry. New tokens default to:
- a
tdm_prefix; - the Read and write permissions preset, which excludes the
:deletescopes; - a 90-day expiry, which you can change to 7, 30, 60 or 365 days, a custom date or no expiry;
- access to all projects, which you can limit to selected projects.
The token list shows each token’s prefix, scope count, creation date, expiry and last use. Revoke takes effect immediately.
Scopes
Section titled “Scopes”| Scope | Grants |
|---|---|
tasks:read |
Read tasks and the workspace context endpoint |
tasks:write |
Create and update tasks |
tasks:delete |
Move tasks to Trash |
projects:read |
Read projects |
projects:write |
Create and update projects and sections |
projects:delete |
Move projects to Trash; delete sections and move their non-trashed tasks to Trash |
projects:share |
Read and change project collaborators |
labels:read |
Read labels |
labels:write |
Create and update labels |
labels:delete |
Delete labels |
filters:read |
Read saved filters |
filters:write |
Create and update saved filters |
filters:delete |
Delete saved filters |
comments:read |
Read comments |
comments:write |
Post and edit comments |
comments:delete |
Delete comments |
reminders:read |
Read reminders |
reminders:write |
Create and update reminders |
reminders:delete |
Delete reminders |
settings:write |
Change account preferences through the API |
Most routes return 401 when a token lacks the required scope. Quick Add returns
403 if its text asks to create a reminder but the token lacks reminders:write.
Signed-in browser sessions carry an implicit * scope, which is why the same
route handlers serve both the app and API clients.
Using a token
Section titled “Using a token”curl -H "Authorization: Bearer tdm_..." \ "https://tasks.example.com/api/v1/tasks?completed=false"Endpoints
Section titled “Endpoints”| Method and path | Operation |
|---|---|
GET /context |
Workspace context: user, timezone, today, Inbox, granted scopes |
PATCH /settings |
Update account preferences |
GET /projects |
List every accessible project |
POST /projects |
Create a project |
GET /projects/{id} |
One project |
PATCH /projects/{id} |
Update a project |
DELETE /projects/{id} |
Move a project to Trash |
GET, POST /projects/{id}/collaborators |
List or invite project collaborators |
DELETE /projects/{id}/collaborators |
Remove a collaborator or leave a shared project |
GET /projects/{id}/completed-tasks |
List completed project tasks |
GET /sections?projectId= |
List sections |
POST /sections |
Create a section |
PATCH /sections/{id} |
Update a section |
DELETE /sections/{id} |
Delete a section; move its non-trashed tasks to Trash |
GET /tasks |
List tasks, cursor-paginated |
POST /tasks |
Create a task |
POST /tasks/quick-add |
Create a task from a natural-language line |
GET /tasks/{id} |
One task with its labels, comments and reminders |
PATCH /tasks/{id} |
Update a task |
DELETE /tasks/{id} |
Move a task to Trash |
POST /trash/tasks/{id}/restore |
Restore a task from Trash |
POST /trash/projects/{id}/restore |
Restore a project from Trash |
GET /labels, POST /labels |
List and create labels |
PATCH/DELETE /labels/{id} |
Update and delete a label |
GET /filters, POST /filters |
List and create saved filters |
PATCH/DELETE /filters/{id} |
Update and delete a saved filter |
GET /comments, POST /comments |
List and post comments |
PATCH/DELETE /comments/{id} |
Update and delete a comment |
GET /reminders, POST /reminders |
List and create reminders |
PATCH/DELETE /reminders/{id} |
Update and delete a reminder |
GET, POST /attachments |
List task attachments or upload one |
GET, DELETE /attachments/{id} |
Download or permanently delete an attachment |
POST, DELETE /auth/device-token |
Create a device token or revoke the token used by this request |
PUT, DELETE /push/subscription |
Register or remove a device push address |
Deleting a task or project moves it to Trash. Deleting a section removes the section and moves its non-trashed tasks, including completed ones, to Trash. Deleting a label, filter, comment, reminder or attachment is permanent. Deleting a collaborator removes their project membership.
POST /tasks/quick-add needs reminders:write as well as tasks:write whenever
the submitted text contains a remind me phrase. A token without it gets a 403,
rather than a task created with the reminder dropped. See
Quick add syntax.
Start with /context
Section titled “Start with /context”curl -H "Authorization: Bearer tdm_..." https://tasks.example.com/api/v1/context{ "apiVersion": "v1", "serverTime": "2026-03-03T09:14:22.104Z", "today": "2026-03-03", "user": { "id": "…", "username": "…", "timezone": "Europe/Amsterdam", "dateFormat": "dd.MM.yyyy", "weekStart": 1, "emailRemindersAvailable": true }, "inbox": { "id": "…", "name": "Inbox", "isInbox": true }, "grantedScopes": ["tasks:read", "tasks:write", "…"]}An agent should call this first. It resolves “today” in the user’s timezone,
names the Inbox and reports which scopes the token holds. The user object also
includes emailRemindersAvailable, which is false when SMTP is not configured
or the account has no email address.
Listing tasks
Section titled “Listing tasks”GET /tasks accepts:
| Parameter | Effect |
|---|---|
projectId, sectionId, parentId |
Scope to a project, section or parent task |
labelId |
Only tasks carrying that label. Must be a label you own |
completed |
true or false |
priority |
1–4 |
dueBefore, dueAfter |
Inclusive YYYY-MM-DD bounds |
query |
Case-insensitive substring over name and description |
limit |
1–100, default 50 |
cursor |
From the previous page’s nextCursor |
updatedSince |
ISO datetime. See delta sync |
includeDeleted |
true to include soft-deleted tasks |
The response is:
{ "items": [ … ], "nextCursor": "eyJ1cGRhdGVkQXQiOiI…", "serverTime": "2026-03-03T09:14:22.104Z"}Results are ordered by updatedAt descending. The cursor is opaque. Pass it
back verbatim; do not construct one. An invalid cursor returns 400.
Delta sync
Section titled “Delta sync”Native clients pull changes rather than the whole workspace:
- Full pull once, keeping the
serverTimefrom the response. - Next pull:
?updatedSince=<that serverTime>&includeDeleted=true. - Keep the new
serverTimefor the pull after that.
serverTime is read before the query runs, so a write landing mid-request
falls inside the next sync window rather than between two of them.
includeDeleted=true matters: a soft-deleted task is the only record that a
deletion happened, so a client that filters them out will never learn to drop the
row.
Idempotency
Section titled “Idempotency”Create requests for tasks, Quick Add, projects, sections and labels accept an
optional Idempotency-Key header (1–200 characters). Without it, the server
does not deduplicate retries:
curl -X POST https://tasks.example.com/api/v1/tasks \ -H "Authorization: Bearer tdm_..." \ -H "Idempotency-Key: 8f3c2b1a-…" \ -H "Content-Type: application/json" \ -d '{"projectId":"…","content":"Renew passport"}'Behaviour:
| Situation | Response |
|---|---|
| First use of the key | The request runs; status and body are recorded |
| Replay with the same body | The recorded response, replayed |
| Replay with a different body | 409, the key was used with a different request |
| Replay while the first is still running | 409 with Retry-After: 1 |
| Replay after 24 hours | The reservation is discarded, so the request can run again |
Keys are scoped per user, API operation and credential or browser session, and records are retained for 24 hours. Reuse a key only within that window to retry a create without producing duplicates.
Device tokens
Section titled “Device tokens”POST /api/v1/auth/device-token is the unauthenticated v1 route for creating a
device token. A client can exchange a username, password and device name:
curl -X POST https://tasks.example.com/api/v1/auth/device-token \ -H "Content-Type: application/json" \ -d '{"username":"you","password":"…","deviceName":"Pixel 9"}'The endpoint also accepts a one-time code from the browser sign-in flow. This lets a client use passwordless sign-in such as OpenID Connect. The code expires after five minutes and each exchange attempt consumes it. See the OpenAPI document for the PKCE exchange fields.
The resulting token carries every API scope and no expiry. A phone that stops syncing after 90 days reads as data loss, so revocation is the control rather than rotation. It appears in Settings → API tokens under the device name you gave and is revoked from the same place.
Password exchange shares the login rate-limit budget: 5 attempts per username
and 20 per IP address per 5 minutes, then 429 with a Retry-After header. The
one-time code exchange does not use that password limit.
DELETE /api/v1/auth/device-token revokes the token used for that request.
PUT /api/v1/push/subscription registers its push address. The server sends a
small sync signal when account data changes elsewhere, not task data. HTTPS is
required unless the server administrator allows private-network addresses.
Errors
Section titled “Errors”| Status | Meaning |
|---|---|
400 |
Validation failed. The body carries per-field errors |
401 |
No credential, an expired or revoked token or usually a missing scope |
403 |
Project role denies the action or Quick Add needs reminders:write for a reminder in its text |
404 |
Not found or not yours. Conatus does not distinguish the two |
409 |
Idempotency conflict |
413 |
Attachment over the 10 MB limit |
429 |
Rate limited. Honour Retry-After |
OpenAPI
Section titled “OpenAPI”curl https://tasks.example.com/api/v1/openapi.jsonThe servers entry is built from PUBLIC_BASE_URL, so set that if you generate
clients against a deployed instance. The document is versioned with the
application, not with this site.
Health check
Section titled “Health check”GET /api/health needs no credential and reports database reachability:
200 {"status":"ok","db":"up"} or 503. Point your uptime monitor at it.