5 minutes to help shape OpenTodo. Anonymous, no account. Take the survey

Your account and credentials API

GET /api/v1/encryption/keys

List encryption keys · Token or session

{keys}: the wrapped key record, or 404 encryption_disabled; see End-to-end encryption

Response 200
FieldTypeDescription
keys requiredobject | null
keys.createdAt requirednumber
keys.iterations requirednumber
keys.kdf requirednumber
keys.salt requiredstring
keys.updatedAt requirednumber
keys.version requirednumber
keys.wrappedByPassphrase requiredstring
keys.wrappedByRecovery requiredstring

PUT /api/v1/encryption/keys

Update encryption keys · Token or session

create (version: 1) or replace (version = stored + 1) the key record → 201/200 {keys}; 409 encryption_conflict

Needs a session or an admin token; full tokens are refused.

Request body
FieldTypeDescription
createdAt requirednumber
iterations requirednumber
kdf requirednumber
salt requiredstring
updatedAt requirednumber
version requirednumber
wrappedByPassphrase requiredstring
wrappedByRecovery requiredstring
Response 200
FieldTypeDescription
digestDisabledboolean
issueConnectionsStoppedarray of string
keys requiredobject
keys.createdAt requirednumber
keys.iterations requirednumber
keys.kdf requirednumber
keys.salt requiredstring
keys.updatedAt requirednumber
keys.version requirednumber
keys.wrappedByPassphrase requiredstring
keys.wrappedByRecovery requiredstring

DELETE /api/v1/encryption/keys

Delete encryption keys · Token or session

204; turns encryption off for the account (404 encryption_disabled without a record)

Needs a session or an admin token; full tokens are refused. Needs a recently confirmed session or second factor.

Response 200: OK

POST /api/v1/encryption/purge-history

Encryption purge history · Token or session

→ {purged, notice}; deletes superseded content operations; 409 encryption_disabled

Response 200
FieldTypeDescription
notice requiredstring
purged requirednumber

GET /api/v1/me

Get me · Token or session

{user, mfa, encryption: {enabled, keyVersion}, minClientVersion, auth, agent_excluded_projects}; auth describes the credential, see Credential introspection; agent_excluded_projects lists the projects kept away from assistants; day_parts is the account's Day parts preference, energy_levels its Energy levels switch and time_sectors its Time sectors switch, so a client can read quick-add lines like the app; keep_open_subtasks is true when the account keeps open subtasks, so a client completes a task's open subtasks with it otherwise, like the app; closed_list is {limit, focus_date, focus, slots_date, slots}, the account's Today limit (0 = off) and the dates and task ids of today's focus and taken slots as stored, so a client can fill Today's slots like the app (ids and dates only). The owner's session also gets config_warnings: [{variable, message, ignored?}], configuration problems the server started despite (an invalid OPENTODO_TRUSTED_PROXIES entry, outgoing email without OPENTODO_BASE_URL), empty when there are none; admins, members and tokens never get the field

Response 200
FieldTypeDescription
agent_excluded_projectsarray of string
attachmentsobject
auth requiredobject
automationsobject
automations.enabled requiredboolean
automations.paused requiredboolean
closed_listobject
closed_list.focus requiredstring
closed_list.focus_date requiredstring
closed_list.limit requirednumber
closed_list.slots requiredstring
closed_list.slots_date requiredstring
config_warningsarray of object
config_warnings[].ignoredarray of string
config_warnings[].message requiredstring
config_warnings[].variable requiredstring
day_partsboolean
encryption requiredobject
encryption.enabled requiredboolean
encryption.keyVersion requirednumber
energy_levelsboolean
keep_open_subtasksboolean
mapsboolean
mfa requiredobject | null
mfa.enrolled requiredboolean
mfa.policy requiredstring
mfa.recoveryCodesRemaining requirednumber
mfa.required requiredboolean
mfa.restricted requiredboolean
minClientVersion requirednumber
speechobject
time_sectorsboolean
user requiredobject | null
user.createdAt requirednumber
user.email requiredstring
user.id requiredstring
user.name requiredstring
user.role requiredstring

GET /api/v1/me/activity

Get me activity · Token or session

{events:[…]}: your own access events, last 90 days, at most 100

Response 200
FieldTypeDescription
events requiredarray of object
events[].actorEmail requiredstring | null
events[].actorId requiredstring | null
events[].details requiredobject
events[].hash requiredstring | null
events[].id requirednumber
events[].ip requiredstring | null
events[].name requiredstring
events[].outcome requiredstring
events[].targetEmail requiredstring | null
events[].targetId requiredstring | null
events[].ts requirednumber
events[].userAgent requiredstring

GET /api/v1/me/agent-access

Get me agent access · Token or session

{allow_writes, owner_allows_writes, mcp_enabled}: your "Allow AI assistants to make changes" switch; read and agent tokens → 403 insufficient_scope

Refuses read and agent tokens.

Response 200
FieldTypeDescription
allow_writes requiredboolean
mcp_enabled requiredboolean
owner_allows_writes requiredboolean

PUT /api/v1/me/agent-access

Update me agent access · Token or session

{allow_writes: boolean} → same shape; recorded as settings.changed (agent.writes); anything else → 400 invalid_input; demo instances → 403 demo_restricted

Refuses read and agent tokens.

Response 200
FieldTypeDescription
allow_writes requiredboolean
mcp_enabled requiredboolean
owner_allows_writes requiredboolean

GET /api/v1/me/email-digest

Get me email digest · Token or session

your weekly email digest settings, see Weekly digest; read and agent tokens → 403 insufficient_scope

Refuses read and agent tokens.

Response 200
FieldTypeDescription
available requiredboolean
enabled requiredboolean
encryption requiredboolean
hour requirednumber
language requiredstring
lastAttemptAt requirednumber | null
lastOutcomestring
lastSentForstring
nextSendAt requirednumber | null
timeZone requiredstring
weekday requirednumber

PUT /api/v1/me/email-digest

Update me email digest · Token or session

any of {enabled, weekday, hour, timeZone, language} → the same shape; demo instances → 403 demo_restricted

Refuses read and agent tokens.

Request body
FieldTypeDescription
enabledboolean | null
hournumber | null
languagestring | null
timeZonestring | null
weekdaynumber | null
Response 200
FieldTypeDescription
available requiredboolean
enabled requiredboolean
encryption requiredboolean
hour requirednumber
language requiredstring
lastAttemptAt requirednumber | null
lastOutcomestring
lastSentForstring
nextSendAt requirednumber | null
timeZone requiredstring
weekday requirednumber

GET /api/v1/me/identities

List me identities · Token or session

{identities:[…], provider}

Response 200
FieldTypeDescription
identities requiredarray of object
identities[].createdAt requirednumber
identities[].email requiredstring
identities[].id requiredstring
identities[].issuer requiredstring
identities[].lastLoginAt requirednumber | null
provider requiredobject
provider.displayName requiredstring
provider.enabled requiredboolean
provider.ssoOnly requiredboolean

DELETE /api/v1/me/identities/{id}

Delete a me identity · Token or session

204, or 409 last_credential

Needs a session or an admin token; full tokens are refused.

Path parameters
FieldTypeDescription
id requiredstringpath

Response 200: OK

POST /api/v1/me/password

Me password · Token or session

{currentPassword, newPassword} → 204; signs out your other sessions

Needs a session or an admin token; full tokens are refused. Needs a recently confirmed session or second factor.

Request body
FieldTypeDescription
currentPassword requiredstring
newPassword requiredstring

Response 200: OK

POST /api/v1/me/sign-out-everywhere

Me sign out everywhere · Session only

→ 204 and the session cookie cleared: ends every session of the account (this one too), forgets its remembered browsers and revokes its API tokens and app passwords; recorded as sessions.revoked; the other devices remove their local copy on their next auth/status (revoked); a token gets 403 session_required

Needs a session; tokens are refused. Needs a recently confirmed session or second factor.

Response 200: OK

GET /api/v1/mfa

Get mfa · Token or session

{mfa}, see Two-factor authentication

Response 200
FieldTypeDescription
mfa requiredobject | null
mfa.enrolled requiredboolean
mfa.policy requiredstring
mfa.recoveryCodesRemaining requirednumber
mfa.required requiredboolean
mfa.restricted requiredboolean

POST /api/v1/mfa/recovery-codes/regenerate

Mfa recovery codes regenerate · Token or session

→ {recoveryCodes:[10]}; every earlier code stops working

Needs a session or an admin token; full tokens are refused. Needs a recently confirmed session or second factor.

Response 200
FieldTypeDescription
recoveryCodes requiredarray of string

DELETE /api/v1/mfa/totp

Delete mfa totp · Token or session

turn the second factor off → 204

Needs a session or an admin token; full tokens are refused. Needs a recently confirmed session or second factor.

Response 200: OK

POST /api/v1/mfa/totp/confirm

Mfa totp confirm · Token or session

{code} → {recoveryCodes:[10], mfa} (codes shown once)

Needs a session or an admin token; full tokens are refused. Needs a recently confirmed session or second factor.

Request body
FieldTypeDescription
code requiredstring
Response 200
FieldTypeDescription
mfa requiredobject | null
mfa.enrolled requiredboolean
mfa.policy requiredstring
mfa.recoveryCodesRemaining requirednumber
mfa.required requiredboolean
mfa.restricted requiredboolean
recoveryCodes requiredarray of string

POST /api/v1/mfa/totp/enroll

Mfa totp enroll · Token or session

→ {secret, uri, expiresAt} (pending for 10 minutes; the only time the secret is returned)

Needs a session or an admin token; full tokens are refused. Needs a recently confirmed session or second factor.

Response 200
FieldTypeDescription
expiresAt requirednumber
secret requiredstring
uri requiredstring

GET /api/v1/mfa/trusted-devices

List mfa trusted devices · Token or session

{devices:[{id,userAgent,createdAt,expiresAt,lastUsedAt}]}

Response 200
FieldTypeDescription
devices requiredarray of object
devices[].createdAt requirednumber
devices[].expiresAt requirednumber
devices[].id requiredstring
devices[].lastUsedAt requirednumber | null
devices[].userAgent requiredstring

DELETE /api/v1/mfa/trusted-devices

Delete mfa trusted devices · Token or session

forget every remembered browser → 204

Response 200: OK

DELETE /api/v1/mfa/trusted-devices/{id}

Delete a mfa trusted device · Token or session

forget one → 204

Path parameters
FieldTypeDescription
id requiredstringpath

Response 200: OK

GET /api/v1/notifications

List notifications · Token or session

your in-app notifications and the unread count, see Assignment and notifications

Response 200
FieldTypeDescription
notifications requiredarray of object
notifications[].createdAt requirednumber
notifications[].id requiredstring
notifications[].kind requiredstring
notifications[].payload requiredstring
notifications[].readAt requirednumber | null
unread requirednumber

POST /api/v1/notifications/{id}/read

Notification read · Token or session

mark one read → 204

Path parameters
FieldTypeDescription
id requiredstringpath

Response 200: OK

GET /api/v1/passkeys

List passkeys · Token or session

{passkeys:[{id,name,createdAt,lastUsedAt,suspiciousAt,backedUp}]}

Response 200
FieldTypeDescription
passkeys requiredarray of object
passkeys[].backedUp requiredboolean
passkeys[].createdAt requirednumber
passkeys[].id requiredstring
passkeys[].lastUsedAt requirednumber | null
passkeys[].name requiredstring
passkeys[].suspiciousAt requirednumber | null

PATCH /api/v1/passkeys/{id}

Update a passkey · Token or session

{name} → {passkey}

Needs a session or an admin token; full tokens are refused.

Path parameters
FieldTypeDescription
id requiredstringpath
Request body
FieldTypeDescription
name requiredstring
Response 200
FieldTypeDescription
passkey requiredobject | null
passkey.backedUp requiredboolean
passkey.createdAt requirednumber
passkey.id requiredstring
passkey.lastUsedAt requirednumber | null
passkey.name requiredstring
passkey.suspiciousAt requirednumber | null

DELETE /api/v1/passkeys/{id}

Delete a passkey · Token or session

204

Needs a session or an admin token; full tokens are refused.

Path parameters
FieldTypeDescription
id requiredstringpath

Response 200: OK

POST /api/v1/passkeys/register

Passkeys register · Token or session

{name, credential} → 201 {passkey}

Needs a session or an admin token; full tokens are refused. Needs a recently confirmed session or second factor.

Request body
FieldTypeDescription
credential requiredobject
credential.id requiredstring
credential.rawId requiredstring
credential.response requiredobject
credential.response.attestationObject requiredstring
credential.response.authenticatorData requiredstring
credential.response.clientDataJSON requiredstring
credential.response.signature requiredstring
credential.response.transports requiredarray of string
credential.type requiredstring
name requiredstring
Response 201
FieldTypeDescription
passkey requiredobject | null
passkey.backedUp requiredboolean
passkey.createdAt requirednumber
passkey.id requiredstring
passkey.lastUsedAt requirednumber | null
passkey.name requiredstring
passkey.suspiciousAt requirednumber | null

POST /api/v1/passkeys/register/options

Create a passkeys register option · Token or session

→ {publicKey} creation options

Needs a session or an admin token; full tokens are refused. Needs a recently confirmed session or second factor.

Response 200
FieldTypeDescription
publicKey requiredobject | null
publicKey.attestation requiredstring
publicKey.authenticatorSelection requiredobject
publicKey.challenge requiredstring
publicKey.excludeCredentials requiredarray of object
publicKey.excludeCredentials[].id requiredstring
publicKey.excludeCredentials[].type requiredstring
publicKey.pubKeyCredParams requiredarray of object
publicKey.rp requiredobject
publicKey.timeout requirednumber
publicKey.user requiredobject

POST /api/v1/push/apple

Push apple · Session only

{deviceId, token, environment, dueToken, includeContent} → 201 {registration:{id, deviceId, includeContent, expiresAt, createdAt}}: registers this iPhone with the push relay; 403 relay-off while the owner's switch is off, 502 relay-unreachable, 400 invalid_input, 429 rate_limited with Retry-After after 5 an hour per account or while the relay is busy

Needs a session; tokens are refused.

Request body
FieldTypeDescription
deviceId requiredstring
dueToken requiredstring
environment requiredstring
includeContent requiredboolean
token requiredstring
Response 201
FieldTypeDescription
registration requiredobject
registration.createdAt requirednumber
registration.deviceId requiredstring
registration.expiresAt requirednumber
registration.id requiredstring
registration.includeContent requiredboolean

DELETE /api/v1/push/apple/{id}

Delete a push apple · Session only

204, or 404 not_found; works with the owner's switch off too, and contacts no relay

Needs a session; tokens are refused.

Path parameters
FieldTypeDescription
id requiredstringpath

Response 200: OK

PUT /api/v1/push/apple/{id}/schedule

Update push apple schedule · Session only

{cursor, until} → {renew}: the phone's schedule reflects the op log up to cursor, through until (ms); 404 not_found when the registration is gone

Needs a session; tokens are refused.

Path parameters
FieldTypeDescription
id requiredstringpath
Request body
FieldTypeDescription
cursornumber | null
untilnumber | null
Response 200
FieldTypeDescription
renew requiredboolean

GET /api/v1/push/apple/due

Get push apple due · No authentication

{reminders:[{id, taskId, fireAt, title?}]}: reminders firing from 5 minutes ago to 1 minute ahead, a plain-text title (at most 120 characters) only when the device includes titles and the account is not encrypted; 401 for an unknown token, 429 after 30 an hour per device

No authentication.

Response 200
FieldTypeDescription
reminders requiredarray of object
reminders[].fireAt requirednumber
reminders[].id requiredstring
reminders[].taskId requiredstring
reminders[].titlestring

GET /api/v1/push/apple/status

List push apple status · Session only

{relay:{reached, protocol, error}, registration?}: the relay's part of the delivery check; with ?device={id} also that device's {id, expiresAt, failures, relayUnreachable} or null. The relay is asked only while the owner's switch is on (403 relay-off otherwise)

Needs a session; tokens are refused.

Response 200
FieldTypeDescription
registrationobject | null
registration.expiresAt requirednumber
registration.failures requirednumber
registration.id requiredstring
registration.relayUnreachable requiredboolean
relay requiredobject
relay.error requiredstring | null
relay.protocol requirednumber
relay.reached requiredboolean

POST /api/v1/push/subscriptions

Create a push subscription · Token or session

{deviceId, endpoint, keys:{p256dh, auth}, includeContent?} → 201 {subscription} (200 when the device's subscription was replaced)

Request body
FieldTypeDescription
deviceId requiredstring
endpoint requiredstring
includeContent requiredboolean
keys requiredobject
keys.auth requiredstring
keys.p256dh requiredstring
notifyobject | null
notify.assigned requiredboolean
notify.status requiredboolean
Response 200
FieldTypeDescription
subscription requiredobject
subscription.createdAt requirednumber
subscription.deviceId requiredstring
subscription.failures requirednumber
subscription.id requiredstring
subscription.includeContent requiredboolean
subscription.lastError requiredstring
subscription.lastOkAt requirednumber | null
subscription.needsRenewal requiredboolean
subscription.notify requiredobject
subscription.notify.assigned requiredboolean
subscription.notify.status requiredboolean

DELETE /api/v1/push/subscriptions/{id}

Delete a push subscription · Token or session

204, or 404 not_found

Path parameters
FieldTypeDescription
id requiredstringpath

Response 200: OK

POST /api/v1/push/test

Push test · Token or session

{deviceId} → 200 {outcome, testId?, subscription, status?, error?}: sends one real test push to that device; 5 per account per 10 minutes, see Reminders and push

Request body
FieldTypeDescription
deviceId requiredstring
Response 200
FieldTypeDescription
errorstring
outcome requiredstring
statusnumber
subscriptionobject
subscription.createdAtnumber
subscription.deviceIdstring
subscription.failuresnumber
subscription.idstring
subscription.includeContentboolean
subscription.lastErrorstring
subscription.lastOkAtnumber | null
subscription.needsRenewalboolean
subscription.notifyobject
subscription.notify.assigned requiredboolean
subscription.notify.status requiredboolean
testIdstring

GET /api/v1/push/vapid-key

Get push vapid key · Token or session

{publicKey}; with ?device={id} also subscription (that device's status or null), see Reminders and push

Response 200
FieldTypeDescription
publicKey requiredstring
subscriptionobject | null
subscription.createdAt requirednumber
subscription.deviceId requiredstring
subscription.failures requirednumber
subscription.id requiredstring
subscription.includeContent requiredboolean
subscription.lastError requiredstring
subscription.lastOkAt requirednumber | null
subscription.needsRenewal requiredboolean
subscription.notify requiredobject
subscription.notify.assigned requiredboolean
subscription.notify.status requiredboolean

GET /api/v1/tokens

List tokens · Token or session

{tokens:[{id,name,scope,createdAt,lastUsedAt}]}; lastUsedAt is updated at most once a minute; read and agent tokens → 403 insufficient_scope

Refuses read and agent tokens.

Response 200
FieldTypeDescription
tokens requiredarray of object
tokens[].createdAt requirednumber
tokens[].expiresAtnumber | null
tokens[].id requiredstring
tokens[].lastUsedAt requirednumber | null
tokens[].name requiredstring
tokens[].scope requiredstring
tokens[].workspacesarray of string

POST /api/v1/tokens

Create a token · Token or session

{name, scope?} (full default, read, agent or admin) → 201 {token, secret} (secret shown once); another scope → 400 invalid_input; admin only from a session (a token gets 403 session_required)

Needs a session or an admin token; full tokens are refused. Needs a recently confirmed session or second factor.

Request body
FieldTypeDescription
name requiredstring
scope requiredstring
workspacesarray of string
Response 201
FieldTypeDescription
secret requiredstring
token requiredobject | null
token.createdAt requirednumber
token.expiresAtnumber | null
token.id requiredstring
token.lastUsedAt requirednumber | null
token.name requiredstring
token.scope requiredstring
token.workspacesarray of string

DELETE /api/v1/tokens/{id}

Delete a token · Token or session

204; deleting a connected AI app's access token also disconnects the app (its refresh token stops working, recorded as mcp_oauth.disconnected)

Path parameters
FieldTypeDescription
id requiredstringpath

Response 200: OK

This group in the HTTP API guide