REST API (v2)
The /v2 endpoints are what the web and Android apps use: JSON in, JSON out. Everything below is relative to https://backend.todorant.com (or your own server).
Authentication
Send a token in the Authorization header:
curl https://backend.todorant.com/v2/todos/current?date=2026-11-26 \
-H "Authorization: Bearer tdr_..."
The v1 spelling, a token header, works too. The token is either
- a personal API token (
tdr_…): the right choice for scripts and third-party tools. Create one in Settings → API tokens in the web app. It is shown once, can be revoked at any time, and never expires on its own. - the session token the apps get when you sign in. Don't hand it out: it can't be revoked.
An API token can read and write your todos, hashtags and settings, like a session. It can't manage API tokens, delete the account, link another sign-in method or read the session token; those answer 403.
Errors are {"error": "message"} with the status: 400 invalid input, 401 missing or unknown token (a revoked one too), 404 not found, 409 a conflict, 429 too many requests (the budget is about 10 requests a second per account, bursts of 120).
Todos
A todo has id, text, completed, frog, monthAndYear (2026-11), date (day of month, 01–31), time (HH:MM), order, skipped, frogFails, encrypted, repetitive, deleted, createdAt and updatedAt (milliseconds). Writes take any of the editable fields; a new todo needs monthAndYear.
GET /v2/todos/current
Today's first unfinished todo, and the counts for the day.
| Query | Required | Description |
|---|---|---|
| date | True | The day, as YYYY-MM-DD |
Return: { total, incomplete, todo }. todo is missing when nothing is left.
GET /v2/todos
The planning list (or the completed one), sorted by day, then frogs, then order.
| Query | Description |
|---|---|
| completed | true for completed todos (default: planning) |
| q | Text to search for |
| hash | Hashtags to search for, comma-separated |
| limit | Page size, 50 by default, 500 at most |
| skip | Todos to skip |
Return: { todos: [...] }
POST /v2/todos
Creates a todo, or several when the body is an array. Give an id (24 hex characters) to choose it yourself.
curl -X POST https://backend.todorant.com/v2/todos \
-H "Authorization: Bearer tdr_..." -H "Content-Type: application/json" \
-d '{"text": "Write the report #work", "monthAndYear": "2026-11", "date": "27"}'
Return: { acks: [{ id, u }] }, one per todo. A rejected one has e with the reason instead of u.
PATCH /v2/todos/:id
Changes fields of a todo: {"completed": true}. Return: the ack, { id, u }. When someone wrote a field later than you (another device), the ack's fix has the value that won.
DELETE /v2/todos/:id
Deletes the todo. Return: the ack.
Hashtags
GET /v2/tags
Return: { tags: [...] }: id, tag (without #), color, epic, epicGoal, epicPoints, epicOrder, epicCompleted, numberOfUses.
PATCH /v2/tags/:id
Changes fields of a hashtag, like a todo. Return: the ack.
Settings and name
PATCH /v2/settings
Changes settings: showTodayOnAddTodo, firstDayOfWeek, startTimeOfDay, newTodosGoFirst, preserveOrderByTime, duplicateTagInBreakdown, showMoreByDefault, language. Return: the ack.
PATCH /v2/me
Changes the name: {"name": "Max"}. Return: the ack.
Sync
POST /v2/sync
Everything in one request, the way the apps sync: send changes, get what changed since last time.
| Body | Description |
|---|---|
| since | The cursor of your previous answer. 0 or none returns a full snapshot (without deleted todos) |
| ops | Changes: [{ c: "todo" \| "tag" \| "settings", id, at, set: { ...fields } }], at is the edit time in ms |
Return: { acks?, cursor, todos, tags, user?, hero?, delegation? }. Keep the cursor for the next call. Deleted todos come back with deleted: true once you pass a since.
The same messages work over the WebSocket at /v2/ws: connect with Authorization: Bearer, or from a browser with new WebSocket(url, ['todorant', token]).
API tokens
Managing tokens needs a signed-in session: an API token gets 403 here.
GET /v2/tokens
Return: { tokens: [{ id, name, prefix, createdAt, lastUsedAt }] }, newest first. prefix is the start of the token, to tell them apart. lastUsedAt is null for a token never used, and is accurate to about 10 minutes.
POST /v2/tokens
| Body | Type | Required | Description |
|---|---|---|---|
| name | string | True | A label, 1 to 60 characters |
Return: 201 with { id, name, prefix, createdAt, lastUsedAt, token }. token is only in this answer: the server keeps a hash and can't show it again. An account holds at most 20 tokens (409 after that).
DELETE /v2/tokens/:id
Revokes the token: requests with it get 401 from then on and its open WebSockets are closed. Return: 204.