Health and authentication API
- POST
/api/v1/auth/login - POST
/api/v1/auth/logout - POST
/api/v1/auth/mfa - POST
/api/v1/auth/oidc/app-continue - POST
/api/v1/auth/oidc/app-session - GET
/api/v1/auth/oidc/callback - GET
/api/v1/auth/oidc/start - POST
/api/v1/auth/passkey - POST
/api/v1/auth/passkey/options - POST
/api/v1/auth/password-reset - POST
/api/v1/auth/reauth - POST
/api/v1/auth/register - GET
/api/v1/auth/status - GET
/api/v1/auth/verify/{token} - POST
/api/v1/auth/verify/{token} - POST
/api/v1/demo/sandbox - GET
/api/v1/health - GET
/api/v1/invitations/{id} - GET
/api/v1/openapi.json - GET
/api/v1/password-resets/{token} - POST
/api/v1/password-resets/{token} - GET
/api/v1/project-invites/{token}
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.
| Field | Type | Description |
|---|---|---|
email required | string | |
invitation required | string | |
name required | string | |
password required | string | |
projectInvite required | string | |
setupToken required | string | |
workspaceInvite required | string |
| Field | Type | Description |
|---|---|---|
challenge | string | |
expiresAt | number | |
mfaRequired | boolean | |
user | object | null | |
user.createdAt required | number | |
user.email required | string | |
user.id required | string | |
user.name required | string | |
user.role required | string |
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.
| Field | Type | Description |
|---|---|---|
redirect required | string |
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.
| Field | Type | Description |
|---|---|---|
challenge required | string | |
code required | string | |
recoveryCode required | string | |
remember required | boolean |
| Field | Type | Description |
|---|---|---|
user required | object | null | |
user.createdAt required | number | |
user.email required | string | |
user.id required | string | |
user.name required | string | |
user.role required | string |
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.
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.
| Field | Type | Description |
|---|---|---|
code required | string | |
code_verifier required | string |
GET /api/v1/auth/oidc/callback
Get auth oidc callback · No authentication
provider return: 303 to / + cookie, or to /?error=…
No authentication.
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.
POST /api/v1/auth/passkey
Auth passkey · No authentication
{credential} → {user} + cookie
No authentication.
| 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 |
| Field | Type | Description |
|---|---|---|
challenge | string | |
expiresAt | number | |
mfaRequired | boolean | |
user | object | null | |
user.createdAt required | number | |
user.email required | string | |
user.id required | string | |
user.name required | string | |
user.role required | string |
POST /api/v1/auth/passkey/options
Create a auth passkey option · No authentication
→ {publicKey} sign-in options, see Passkeys
No authentication.
| Field | Type | Description |
|---|---|---|
publicKey required | object | null | |
publicKey.allowCredentials required | array of object | |
publicKey.allowCredentials[].id required | string | |
publicKey.allowCredentials[].type required | string | |
publicKey.challenge required | string | |
publicKey.rpId required | string | |
publicKey.timeout required | number | |
publicKey.userVerification required | string |
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.
| Field | Type | Description |
|---|---|---|
email required | string |
| Field | Type | Description |
|---|---|---|
ok required | boolean |
POST /api/v1/auth/reauth
Auth reauth · Token or session
{password} or {code} → {reauthAt, validForMs}; unlocks *fresh* routes for 10 minutes
| Field | Type | Description |
|---|---|---|
code required | string | |
password required | string |
| Field | Type | Description |
|---|---|---|
reauthAt required | number | |
validForMs required | number |
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.
| Field | Type | Description |
|---|---|---|
email required | string | |
invitation required | string | |
name required | string | |
password required | string | |
projectInvite required | string | |
setupToken required | string | |
workspaceInvite required | string |
| Field | Type | Description |
|---|---|---|
projectId | string | |
role | string | |
user | object | null | |
user.createdAt required | number | |
user.email required | string | |
user.id required | string | |
user.name required | string | |
user.role required | string | |
verificationRequired | boolean | |
workspaceId | string |
| Field | Type | Description |
|---|---|---|
projectId | string | |
role | string | |
user | object | null | |
user.createdAt required | number | |
user.email required | string | |
user.id required | string | |
user.name required | string | |
user.role required | string | |
verificationRequired | boolean | |
workspaceId | string |
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.
| Field | Type | Description |
|---|---|---|
authenticated required | boolean | |
branding required | object | |
branding.logoVersion required | number | |
branding.name required | string | |
demo | object | |
demo.resetsAt required | number | |
demo.sandboxHours required | object | |
demo.sandboxHours.idle required | number | |
demo.sandboxHours.max required | number | |
demo.token required | string | |
encryption | object | |
encryption.enabled required | boolean | |
encryption.keyVersion required | number | |
hosted | boolean | |
mfa | object | null | |
mfa.enrolled required | boolean | |
mfa.policy required | string | |
mfa.recoveryCodesRemaining required | number | |
mfa.required required | boolean | |
mfa.restricted required | boolean | |
minClientVersion | number | |
oidc required | object | |
oidc.displayName required | string | |
oidc.enabled required | boolean | |
oidc.ssoOnly required | boolean | |
outgoingEmail required | object | |
outgoingEmail.enabled required | boolean | |
passkeyDomain required | string | |
passkeysAvailable required | boolean | |
rowClick | object | |
rowClick.default required | string | |
setupCodeForHost | boolean | |
setupCodeRequired | boolean | |
setupRequired required | boolean | |
setupTokenRequired required | boolean | |
signupAllowed required | boolean | |
themes | object | |
themes.version required | number | |
user required | object | null | |
user.createdAt required | number | |
user.email required | string | |
user.id required | string | |
user.name required | string | |
user.role required | string | |
version required | string |
GET /api/v1/auth/verify/{token}
Get a auth verify · No authentication
pending sign-up {email, expiresAt} or 404 verification_invalid
No authentication.
| Field | Type | Description |
|---|---|---|
token required | string | path |
| Field | Type | Description |
|---|---|---|
email required | string | |
expiresAt required | number |
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.
| Field | Type | Description |
|---|---|---|
token required | string | path |
| Field | Type | Description |
|---|---|---|
user required | object | null | |
user.createdAt required | number | |
user.email required | string | |
user.id required | string | |
user.name required | string | |
user.role required | string |
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.
| Field | Type | Description |
|---|---|---|
token required | string |
| Field | Type | Description |
|---|---|---|
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/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.
| Field | Type | Description |
|---|---|---|
app_sign_in required | boolean | |
app_sso required | boolean | |
status required | string | |
version required | string |
GET /api/v1/invitations/{id}
Get a invitation · No authentication
preview {inviterName, email, expiresAt} or 404 invitation_invalid, see Invitations
No authentication.
| Field | Type | Description |
|---|---|---|
id required | string | path |
| Field | Type | Description |
|---|---|---|
email required | string | null | |
expiresAt required | number | |
inviterName required | string |
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.
GET /api/v1/password-resets/{token}
Get a password reset · No authentication
preview {email, expiresAt} or 404 reset_invalid
No authentication.
| Field | Type | Description |
|---|---|---|
token required | string | path |
| Field | Type | Description |
|---|---|---|
email required | string | |
expiresAt required | number |
POST /api/v1/password-resets/{token}
Password reset · No authentication
{password} → 204 or 404 reset_invalid
No authentication.
| Field | Type | Description |
|---|---|---|
token required | string | path |
| Field | Type | Description |
|---|---|---|
password required | string |
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.
| Field | Type | Description |
|---|---|---|
token required | string | path |
| Field | Type | Description |
|---|---|---|
alreadyMember | boolean | |
canCreateAccount required | boolean | |
email required | string | null | |
expiresAt required | number | |
inviterName required | string | |
projectName required | string | |
role required | string |