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

Health and authentication API

POST /api/v1/auth/login

Auth login · No authentication

{email, password} → {user} + cookie, or {mfaRequired:true, challenge, expiresAt} and no cookie when the account has a second factor. A password over 1,024 bytes is refused with 401 invalid_credentials without being checked

No authentication.

Request body
FieldTypeDescription
email requiredstring
invitation requiredstring
name requiredstring
password requiredstring
projectInvite requiredstring
setupToken requiredstring
workspaceInvite requiredstring
Response 200
FieldTypeDescription
challengestring
expiresAtnumber
mfaRequiredboolean
userobject | null
user.createdAt requirednumber
user.email requiredstring
user.id requiredstring
user.name requiredstring
user.role requiredstring

POST /api/v1/auth/logout

Auth logout · No authentication

204, or 200 {redirect} (provider sign-out, see Single sign-on); 403 bad_origin when Origin is another site's or Sec-Fetch-Site is not same-origin (a request naming neither, such as ot logout, is accepted)

No authentication.

Response 200
FieldTypeDescription
redirect requiredstring

POST /api/v1/auth/mfa

Auth mfa · No authentication

{challenge, code} or {challenge, recoveryCode}, optional remember → {user} + cookie (+ ot_trust cookie when remember)

No authentication.

Request body
FieldTypeDescription
challenge requiredstring
code requiredstring
recoveryCode requiredstring
remember requiredboolean
Response 200
FieldTypeDescription
user requiredobject | null
user.createdAt requirednumber
user.email requiredstring
user.id requiredstring
user.name requiredstring
user.role requiredstring

POST /api/v1/auth/oidc/app-continue

Auth oidc app continue · No authentication

The confirmation page's form (ticket, action = continue or cancel) in the system browser, during single sign-on in the apps: 303 to opentodo://sso?code=…&state=…, or with cancel to opentodo://sso?state=…; 303 to /?error=oidc_state_invalid for an unknown, spent or expired ticket; 403 bad_origin from another site

No authentication.

Response 200: OK

POST /api/v1/auth/oidc/app-session

Auth oidc app session · No authentication

{code, code_verifier} from the OpenTodo app's web view, after single sign-on in the system browser: 303 to / + cookie, or the link answers of the callback when the web view is signed in; 400 oidc_state_invalid for an unknown, spent, expired or mismatched code; 403 bad_origin from another site

No authentication.

Request body
FieldTypeDescription
code requiredstring
code_verifier requiredstring

Response 200: OK

GET /api/v1/auth/oidc/callback

Get auth oidc callback · No authentication

provider return: 303 to / + cookie, or to /?error=…

No authentication.

Response 200: OK

GET /api/v1/auth/oidc/start

Get auth oidc start · No authentication

browser navigation: 302 to the provider (links the identity instead when signed in; linking a new identity needs a fresh session)

No authentication.

Response 200: OK

POST /api/v1/auth/passkey

Auth passkey · No authentication

{credential} → {user} + cookie

No authentication.

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
Response 200
FieldTypeDescription
challengestring
expiresAtnumber
mfaRequiredboolean
userobject | null
user.createdAt requirednumber
user.email requiredstring
user.id requiredstring
user.name requiredstring
user.role requiredstring

POST /api/v1/auth/passkey/options

Create a auth passkey option · No authentication

→ {publicKey} sign-in options, see Passkeys

No authentication.

Response 200
FieldTypeDescription
publicKey requiredobject | null
publicKey.allowCredentials requiredarray of object
publicKey.allowCredentials[].id requiredstring
publicKey.allowCredentials[].type requiredstring
publicKey.challenge requiredstring
publicKey.rpId requiredstring
publicKey.timeout requirednumber
publicKey.userVerification requiredstring

POST /api/v1/auth/password-reset

Auth password reset · No authentication

{email} → always 202 {ok: true}; mails a reset link to an active account's address, see Outgoing email; 404 smtp_disabled without outgoing email, 409 base_url_required without OPENTODO_BASE_URL

No authentication.

Request body
FieldTypeDescription
email requiredstring
Response 202
FieldTypeDescription
ok requiredboolean

POST /api/v1/auth/reauth

Auth reauth · Token or session

{password} or {code} → {reauthAt, validForMs}; unlocks *fresh* routes for 10 minutes

Request body
FieldTypeDescription
code requiredstring
password requiredstring
Response 200
FieldTypeDescription
reauthAt requirednumber
validForMs requirednumber

POST /api/v1/auth/register

Auth register · No authentication

{email, name?, password, invitation?, projectInvite?, setupToken?} → 201 {user} + cookie. The first account becomes owner; when OPENTODO_SETUP_TOKEN is set (setupTokenRequired in the status), it needs setupToken with that value, otherwise 403 setup_token_invalid; without a token, a client the status asks for the code (setupCodeRequired: from another machine with OPENTODO_SETUP_CODE=required, or under a domain name while no OPENTODO_BASE_URL is set) sends the one-time setup code from the server log as setupToken (case and dashes ignored), otherwise 403 setup_code_invalid; afterwards an invitation secret admits one member while sign-up is closed, and a projectInvite secret creates a member who joins that project (201 {user, projectId, role}, see Project invite links). With open sign-up and outgoing email, a registration without an invitation answers 202 {verificationRequired: true} and mails a link instead of creating the account

No authentication.

Request body
FieldTypeDescription
email requiredstring
invitation requiredstring
name requiredstring
password requiredstring
projectInvite requiredstring
setupToken requiredstring
workspaceInvite requiredstring
Response 201
FieldTypeDescription
projectIdstring
rolestring
userobject | null
user.createdAt requirednumber
user.email requiredstring
user.id requiredstring
user.name requiredstring
user.role requiredstring
verificationRequiredboolean
workspaceIdstring
Response 202
FieldTypeDescription
projectIdstring
rolestring
userobject | null
user.createdAt requirednumber
user.email requiredstring
user.id requiredstring
user.name requiredstring
user.role requiredstring
verificationRequiredboolean
workspaceIdstring

GET /api/v1/auth/status

List auth status · No authentication

{setupRequired, setupTokenRequired, setupCodeRequired, setupCodeForHost, signupAllowed, authenticated, user, version, passkeysAvailable, oidc, outgoingEmail, mfa?, encryption?, minClientVersion?, demo?}; outgoingEmail is {enabled}, true when outgoing email is configured (never on a demo instance); mfa, encryption and minClientVersion only when signed in; setupCodeRequired is true while no account exists and no setup token is configured, when either OPENTODO_SETUP_CODE=required and the request does not come over a direct loopback connection without forwarding headers, or no OPENTODO_BASE_URL is set and the request is addressed to a domain name (not an IP address, a name without a dot or a local-only name such as *.local, *.lan or *.home.arpa); setupCodeForHost is true when the second reason alone asks for the code; demo ({token, sandboxHours: {idle, max}, resetsAt}: a fresh single-use sandbox-creation token valid for 10 minutes, the sandbox lifetimes in hours and the next nightly reset; no credentials) only on a demo instance; wipeKey for a signed-in browser session, and revoked: {proof} for the cookie of a session ended by sign out everywhere, deactivation or deletion, where proof is base64url(HMAC-SHA256(wipe key, opentodo device revoked v1)): the web app removes its local copy when it matches the key it stored (see Two-factor authentication, Single sign-on, End-to-end encryption)

No authentication.

Response 200
FieldTypeDescription
authenticated requiredboolean
branding requiredobject
branding.logoVersion requirednumber
branding.name requiredstring
demoobject
demo.resetsAt requirednumber
demo.sandboxHours requiredobject
demo.sandboxHours.idle requirednumber
demo.sandboxHours.max requirednumber
demo.token requiredstring
encryptionobject
encryption.enabled requiredboolean
encryption.keyVersion requirednumber
hostedboolean
mfaobject | null
mfa.enrolled requiredboolean
mfa.policy requiredstring
mfa.recoveryCodesRemaining requirednumber
mfa.required requiredboolean
mfa.restricted requiredboolean
minClientVersionnumber
oidc requiredobject
oidc.displayName requiredstring
oidc.enabled requiredboolean
oidc.ssoOnly requiredboolean
outgoingEmail requiredobject
outgoingEmail.enabled requiredboolean
passkeyDomain requiredstring
passkeysAvailable requiredboolean
rowClickobject
rowClick.default requiredstring
setupCodeForHostboolean
setupCodeRequiredboolean
setupRequired requiredboolean
setupTokenRequired requiredboolean
signupAllowed requiredboolean
themesobject
themes.version requirednumber
user requiredobject | null
user.createdAt requirednumber
user.email requiredstring
user.id requiredstring
user.name requiredstring
user.role requiredstring
version requiredstring

GET /api/v1/auth/verify/{token}

Get a auth verify · No authentication

pending sign-up {email, expiresAt} or 404 verification_invalid

No authentication.

Path parameters
FieldTypeDescription
token requiredstringpath
Response 200
FieldTypeDescription
email requiredstring
expiresAt requirednumber

POST /api/v1/auth/verify/{token}

Auth verify · No authentication

creates the account of a pending sign-up → 201 {user} + cookie; 404 verification_invalid, 403 signup_closed, 409 email_taken

No authentication.

Path parameters
FieldTypeDescription
token requiredstringpath
Response 201
FieldTypeDescription
user requiredobject | null
user.createdAt requirednumber
user.email requiredstring
user.id requiredstring
user.name requiredstring
user.role requiredstring

POST /api/v1/demo/sandbox

Demo sandbox · No authentication

demo instance only (absent otherwise): {token} from auth/status → 201 {user} + cookie for a new private sandbox. Requires a same-origin Origin header; 403 demo_token (missing, forged, expired or used token), 403 bad_origin, 429 rate_limited (5 per address per hour), 503 demo_busy

No authentication.

Request body
FieldTypeDescription
token requiredstring
Response 201
FieldTypeDescription
user requiredobject | null
user.createdAt requirednumber
user.email requiredstring
user.id requiredstring
user.name requiredstring
user.role requiredstring

GET /api/v1/health

Get health · No authentication

The same answer as /healthz, under the API path, for reverse proxies and platforms that answer /healthz themselves (Pomerium, Google Cloud Run). The mobile apps check a server here first, then at /healthz

No authentication.

Response 200
FieldTypeDescription
app_sign_in requiredboolean
app_sso requiredboolean
status requiredstring
version requiredstring

GET /api/v1/invitations/{id}

Get a invitation · No authentication

preview {inviterName, email, expiresAt} or 404 invitation_invalid, see Invitations

No authentication.

Path parameters
FieldTypeDescription
id requiredstringpath
Response 200
FieldTypeDescription
email requiredstring | null
expiresAt requirednumber
inviterName requiredstring

GET /api/v1/openapi.json

Get openapi.json · No authentication

The OpenAPI 3.1 description of this server's API: application/json, gzip when accepted, ETag and Cache-Control: public, max-age=3600, readable from any site

No authentication.

Response 200: OK

GET /api/v1/password-resets/{token}

Get a password reset · No authentication

preview {email, expiresAt} or 404 reset_invalid

No authentication.

Path parameters
FieldTypeDescription
token requiredstringpath
Response 200
FieldTypeDescription
email requiredstring
expiresAt requirednumber

POST /api/v1/password-resets/{token}

Password reset · No authentication

{password} → 204 or 404 reset_invalid

No authentication.

Path parameters
FieldTypeDescription
token requiredstringpath
Request body
FieldTypeDescription
password requiredstring

Response 200: OK

GET /api/v1/project-invites/{token}

Get a project invite · No authentication

preview {inviterName, projectName, role, email, expiresAt, canCreateAccount, alreadyMember?} or 404 invitation_invalid, see Project invite links

No authentication.

Path parameters
FieldTypeDescription
token requiredstringpath
Response 200
FieldTypeDescription
alreadyMemberboolean
canCreateAccount requiredboolean
email requiredstring | null
expiresAt requirednumber
inviterName requiredstring
projectName requiredstring
role requiredstring

This group in the HTTP API guide