Your account and credentials API
- GET
/api/v1/encryption/keys - PUT
/api/v1/encryption/keys - DELETE
/api/v1/encryption/keys - POST
/api/v1/encryption/purge-history - GET
/api/v1/me - GET
/api/v1/me/activity - GET
/api/v1/me/agent-access - PUT
/api/v1/me/agent-access - GET
/api/v1/me/email-digest - PUT
/api/v1/me/email-digest - GET
/api/v1/me/identities - DELETE
/api/v1/me/identities/{id} - POST
/api/v1/me/password - POST
/api/v1/me/sign-out-everywhere - GET
/api/v1/mfa - POST
/api/v1/mfa/recovery-codes/regenerate - DELETE
/api/v1/mfa/totp - POST
/api/v1/mfa/totp/confirm - POST
/api/v1/mfa/totp/enroll - GET
/api/v1/mfa/trusted-devices - DELETE
/api/v1/mfa/trusted-devices - DELETE
/api/v1/mfa/trusted-devices/{id} - GET
/api/v1/notifications - POST
/api/v1/notifications/{id}/read - GET
/api/v1/passkeys - PATCH
/api/v1/passkeys/{id} - DELETE
/api/v1/passkeys/{id} - POST
/api/v1/passkeys/register - POST
/api/v1/passkeys/register/options - POST
/api/v1/push/apple - DELETE
/api/v1/push/apple/{id} - PUT
/api/v1/push/apple/{id}/schedule - GET
/api/v1/push/apple/due - GET
/api/v1/push/apple/status - POST
/api/v1/push/subscriptions - DELETE
/api/v1/push/subscriptions/{id} - POST
/api/v1/push/test - GET
/api/v1/push/vapid-key - GET
/api/v1/tokens - POST
/api/v1/tokens - DELETE
/api/v1/tokens/{id}
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
| Field | Type | Description |
|---|---|---|
keys required | object | null | |
keys.createdAt required | number | |
keys.iterations required | number | |
keys.kdf required | number | |
keys.salt required | string | |
keys.updatedAt required | number | |
keys.version required | number | |
keys.wrappedByPassphrase required | string | |
keys.wrappedByRecovery required | string |
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.
| Field | Type | Description |
|---|---|---|
createdAt required | number | |
iterations required | number | |
kdf required | number | |
salt required | string | |
updatedAt required | number | |
version required | number | |
wrappedByPassphrase required | string | |
wrappedByRecovery required | string |
| Field | Type | Description |
|---|---|---|
digestDisabled | boolean | |
issueConnectionsStopped | array of string | |
keys required | object | |
keys.createdAt required | number | |
keys.iterations required | number | |
keys.kdf required | number | |
keys.salt required | string | |
keys.updatedAt required | number | |
keys.version required | number | |
keys.wrappedByPassphrase required | string | |
keys.wrappedByRecovery required | string |
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.
POST /api/v1/encryption/purge-history
Encryption purge history · Token or session
→ {purged, notice}; deletes superseded content operations; 409 encryption_disabled
| Field | Type | Description |
|---|---|---|
notice required | string | |
purged required | number |
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
| Field | Type | Description |
|---|---|---|
agent_excluded_projects | array of string | |
attachments | object | |
auth required | object | |
automations | object | |
automations.enabled required | boolean | |
automations.paused required | boolean | |
closed_list | object | |
closed_list.focus required | string | |
closed_list.focus_date required | string | |
closed_list.limit required | number | |
closed_list.slots required | string | |
closed_list.slots_date required | string | |
config_warnings | array of object | |
config_warnings[].ignored | array of string | |
config_warnings[].message required | string | |
config_warnings[].variable required | string | |
day_parts | boolean | |
encryption required | object | |
encryption.enabled required | boolean | |
encryption.keyVersion required | number | |
energy_levels | boolean | |
keep_open_subtasks | boolean | |
maps | boolean | |
mfa required | object | null | |
mfa.enrolled required | boolean | |
mfa.policy required | string | |
mfa.recoveryCodesRemaining required | number | |
mfa.required required | boolean | |
mfa.restricted required | boolean | |
minClientVersion required | number | |
speech | object | |
time_sectors | boolean | |
user required | object | null | |
user.createdAt required | number | |
user.email required | string | |
user.id required | string | |
user.name required | string | |
user.role required | string |
GET /api/v1/me/activity
Get me activity · Token or session
{events:[…]}: your own access events, last 90 days, at most 100
| Field | Type | Description |
|---|---|---|
events required | array of object | |
events[].actorEmail required | string | null | |
events[].actorId required | string | null | |
events[].details required | object | |
events[].hash required | string | null | |
events[].id required | number | |
events[].ip required | string | null | |
events[].name required | string | |
events[].outcome required | string | |
events[].targetEmail required | string | null | |
events[].targetId required | string | null | |
events[].ts required | number | |
events[].userAgent required | string |
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.
| Field | Type | Description |
|---|---|---|
allow_writes required | boolean | |
mcp_enabled required | boolean | |
owner_allows_writes required | boolean |
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.
| Field | Type | Description |
|---|---|---|
allow_writes required | boolean | |
mcp_enabled required | boolean | |
owner_allows_writes required | boolean |
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.
| Field | Type | Description |
|---|---|---|
available required | boolean | |
enabled required | boolean | |
encryption required | boolean | |
hour required | number | |
language required | string | |
lastAttemptAt required | number | null | |
lastOutcome | string | |
lastSentFor | string | |
nextSendAt required | number | null | |
timeZone required | string | |
weekday required | number |
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.
| Field | Type | Description |
|---|---|---|
enabled | boolean | null | |
hour | number | null | |
language | string | null | |
timeZone | string | null | |
weekday | number | null |
| Field | Type | Description |
|---|---|---|
available required | boolean | |
enabled required | boolean | |
encryption required | boolean | |
hour required | number | |
language required | string | |
lastAttemptAt required | number | null | |
lastOutcome | string | |
lastSentFor | string | |
nextSendAt required | number | null | |
timeZone required | string | |
weekday required | number |
GET /api/v1/me/identities
List me identities · Token or session
{identities:[…], provider}
| Field | Type | Description |
|---|---|---|
identities required | array of object | |
identities[].createdAt required | number | |
identities[].email required | string | |
identities[].id required | string | |
identities[].issuer required | string | |
identities[].lastLoginAt required | number | null | |
provider required | object | |
provider.displayName required | string | |
provider.enabled required | boolean | |
provider.ssoOnly required | boolean |
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.
| Field | Type | Description |
|---|---|---|
id required | string | path |
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.
| Field | Type | Description |
|---|---|---|
currentPassword required | string | |
newPassword required | string |
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.
GET /api/v1/mfa
Get mfa · Token or session
{mfa}, see Two-factor authentication
| Field | Type | Description |
|---|---|---|
mfa required | object | null | |
mfa.enrolled required | boolean | |
mfa.policy required | string | |
mfa.recoveryCodesRemaining required | number | |
mfa.required required | boolean | |
mfa.restricted required | boolean |
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.
| Field | Type | Description |
|---|---|---|
recoveryCodes required | array 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.
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.
| Field | Type | Description |
|---|---|---|
code required | string |
| Field | Type | Description |
|---|---|---|
mfa required | object | null | |
mfa.enrolled required | boolean | |
mfa.policy required | string | |
mfa.recoveryCodesRemaining required | number | |
mfa.required required | boolean | |
mfa.restricted required | boolean | |
recoveryCodes required | array 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.
| Field | Type | Description |
|---|---|---|
expiresAt required | number | |
secret required | string | |
uri required | string |
GET /api/v1/mfa/trusted-devices
List mfa trusted devices · Token or session
{devices:[{id,userAgent,createdAt,expiresAt,lastUsedAt}]}
| Field | Type | Description |
|---|---|---|
devices required | array of object | |
devices[].createdAt required | number | |
devices[].expiresAt required | number | |
devices[].id required | string | |
devices[].lastUsedAt required | number | null | |
devices[].userAgent required | string |
DELETE /api/v1/mfa/trusted-devices
Delete mfa trusted devices · Token or session
forget every remembered browser → 204
DELETE /api/v1/mfa/trusted-devices/{id}
Delete a mfa trusted device · Token or session
forget one → 204
| Field | Type | Description |
|---|---|---|
id required | string | path |
GET /api/v1/notifications
List notifications · Token or session
your in-app notifications and the unread count, see Assignment and notifications
| Field | Type | Description |
|---|---|---|
notifications required | array of object | |
notifications[].createdAt required | number | |
notifications[].id required | string | |
notifications[].kind required | string | |
notifications[].payload required | string | |
notifications[].readAt required | number | null | |
unread required | number |
POST /api/v1/notifications/{id}/read
Notification read · Token or session
mark one read → 204
| Field | Type | Description |
|---|---|---|
id required | string | path |
GET /api/v1/passkeys
List passkeys · Token or session
{passkeys:[{id,name,createdAt,lastUsedAt,suspiciousAt,backedUp}]}
| Field | Type | Description |
|---|---|---|
passkeys required | array of object | |
passkeys[].backedUp required | boolean | |
passkeys[].createdAt required | number | |
passkeys[].id required | string | |
passkeys[].lastUsedAt required | number | null | |
passkeys[].name required | string | |
passkeys[].suspiciousAt required | number | 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.
| Field | Type | Description |
|---|---|---|
id required | string | path |
| Field | Type | Description |
|---|---|---|
name required | string |
| Field | Type | Description |
|---|---|---|
passkey required | object | null | |
passkey.backedUp required | boolean | |
passkey.createdAt required | number | |
passkey.id required | string | |
passkey.lastUsedAt required | number | null | |
passkey.name required | string | |
passkey.suspiciousAt required | number | null |
DELETE /api/v1/passkeys/{id}
Delete a passkey · Token or session
204
Needs a session or an admin token; full tokens are refused.
| Field | Type | Description |
|---|---|---|
id required | string | path |
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.
| Field | Type | Description |
|---|---|---|
credential required | object | |
credential.id required | string | |
credential.rawId required | string | |
credential.response required | object | |
credential.response.attestationObject required | string | |
credential.response.authenticatorData required | string | |
credential.response.clientDataJSON required | string | |
credential.response.signature required | string | |
credential.response.transports required | array of string | |
credential.type required | string | |
name required | string |
| Field | Type | Description |
|---|---|---|
passkey required | object | null | |
passkey.backedUp required | boolean | |
passkey.createdAt required | number | |
passkey.id required | string | |
passkey.lastUsedAt required | number | null | |
passkey.name required | string | |
passkey.suspiciousAt required | number | 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.
| Field | Type | Description |
|---|---|---|
publicKey required | object | null | |
publicKey.attestation required | string | |
publicKey.authenticatorSelection required | object | |
publicKey.challenge required | string | |
publicKey.excludeCredentials required | array of object | |
publicKey.excludeCredentials[].id required | string | |
publicKey.excludeCredentials[].type required | string | |
publicKey.pubKeyCredParams required | array of object | |
publicKey.rp required | object | |
publicKey.timeout required | number | |
publicKey.user required | object |
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.
| Field | Type | Description |
|---|---|---|
deviceId required | string | |
dueToken required | string | |
environment required | string | |
includeContent required | boolean | |
token required | string |
| Field | Type | Description |
|---|---|---|
registration required | object | |
registration.createdAt required | number | |
registration.deviceId required | string | |
registration.expiresAt required | number | |
registration.id required | string | |
registration.includeContent required | boolean |
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.
| Field | Type | Description |
|---|---|---|
id required | string | path |
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.
| Field | Type | Description |
|---|---|---|
id required | string | path |
| Field | Type | Description |
|---|---|---|
cursor | number | null | |
until | number | null |
| Field | Type | Description |
|---|---|---|
renew required | boolean |
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.
| Field | Type | Description |
|---|---|---|
reminders required | array of object | |
reminders[].fireAt required | number | |
reminders[].id required | string | |
reminders[].taskId required | string | |
reminders[].title | string |
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.
| Field | Type | Description |
|---|---|---|
registration | object | null | |
registration.expiresAt required | number | |
registration.failures required | number | |
registration.id required | string | |
registration.relayUnreachable required | boolean | |
relay required | object | |
relay.error required | string | null | |
relay.protocol required | number | |
relay.reached required | boolean |
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)
| Field | Type | Description |
|---|---|---|
deviceId required | string | |
endpoint required | string | |
includeContent required | boolean | |
keys required | object | |
keys.auth required | string | |
keys.p256dh required | string | |
notify | object | null | |
notify.assigned required | boolean | |
notify.status required | boolean |
| Field | Type | Description |
|---|---|---|
subscription required | object | |
subscription.createdAt required | number | |
subscription.deviceId required | string | |
subscription.failures required | number | |
subscription.id required | string | |
subscription.includeContent required | boolean | |
subscription.lastError required | string | |
subscription.lastOkAt required | number | null | |
subscription.needsRenewal required | boolean | |
subscription.notify required | object | |
subscription.notify.assigned required | boolean | |
subscription.notify.status required | boolean |
DELETE /api/v1/push/subscriptions/{id}
Delete a push subscription · Token or session
204, or 404 not_found
| Field | Type | Description |
|---|---|---|
id required | string | path |
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
| Field | Type | Description |
|---|---|---|
deviceId required | string |
| Field | Type | Description |
|---|---|---|
error | string | |
outcome required | string | |
status | number | |
subscription | object | |
subscription.createdAt | number | |
subscription.deviceId | string | |
subscription.failures | number | |
subscription.id | string | |
subscription.includeContent | boolean | |
subscription.lastError | string | |
subscription.lastOkAt | number | null | |
subscription.needsRenewal | boolean | |
subscription.notify | object | |
subscription.notify.assigned required | boolean | |
subscription.notify.status required | boolean | |
testId | string |
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
| Field | Type | Description |
|---|---|---|
publicKey required | string | |
subscription | object | null | |
subscription.createdAt required | number | |
subscription.deviceId required | string | |
subscription.failures required | number | |
subscription.id required | string | |
subscription.includeContent required | boolean | |
subscription.lastError required | string | |
subscription.lastOkAt required | number | null | |
subscription.needsRenewal required | boolean | |
subscription.notify required | object | |
subscription.notify.assigned required | boolean | |
subscription.notify.status required | boolean |
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.
| Field | Type | Description |
|---|---|---|
tokens required | array of object | |
tokens[].createdAt required | number | |
tokens[].expiresAt | number | null | |
tokens[].id required | string | |
tokens[].lastUsedAt required | number | null | |
tokens[].name required | string | |
tokens[].scope required | string | |
tokens[].workspaces | array 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.
| Field | Type | Description |
|---|---|---|
name required | string | |
scope required | string | |
workspaces | array of string |
| Field | Type | Description |
|---|---|---|
secret required | string | |
token required | object | null | |
token.createdAt required | number | |
token.expiresAt | number | null | |
token.id required | string | |
token.lastUsedAt required | number | null | |
token.name required | string | |
token.scope required | string | |
token.workspaces | array 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)
| Field | Type | Description |
|---|---|---|
id required | string | path |