The settings flow requires an active session. Unauthenticated users will be redirected to login.
Initialize settings flow for browsers
Endpoint
Query parameters
URL to redirect the browser to after successful settings update.
Headers
Session cookie for authentication. If missing or invalid, redirects to login.
Response
The flow ID, used to fetch and submit the flow.
The flow type:
browser or api.Time when this flow expires (RFC3339 format).
Time when this flow was issued (RFC3339 format).
The original request URL.
UI container with form fields and messages.
The current identity with traits and credentials.
Current state of the flow (e.g.,
show_form, success).Status codes
| Status | Description |
|---|---|
| 200 | Settings flow created (AJAX requests) |
| 303 | Redirect to settings UI or login |
| 401 | No active session |
| 403 | Session AAL too low (requires re-authentication) |
Initialize settings flow for native apps
Endpoint
Headers
Session token for authentication. Returns 401 if missing or invalid.
Response
Returns the same settings flow object as the browser endpoint.Status codes
| Status | Description |
|---|---|
| 200 | Settings flow created successfully |
| 400 | Invalid request |
| 401 | Invalid or missing session token |
| 403 | Session AAL too low |
Get settings flow
Endpoint
Query parameters
The settings flow ID from the
flow URL query parameter.Headers
Session cookie for browser flows.
Session token for API flows.
Response
Returns the settings flow object.Status codes
| Status | Description |
|---|---|
| 200 | Settings flow found |
| 401 | No active session |
| 403 | Session AAL too low or CSRF violation |
| 404 | Flow not found |
| 410 | Flow expired |
Submit settings flow
The settings flow supports multiple update methods:Update profile traits
Update password
Add TOTP authenticator
Add WebAuthn device
Link/unlink OIDC provider
Endpoint
Query parameters
The settings flow ID.
Headers
Session cookie for browser flows.
Session token for API flows.
Request body
The request body varies by method:Settings method:
profile, password, totp, webauthn, oidc, or lookup_secret.CSRF token from the flow (required for browser flows).
Updated identity traits (email, name, etc.).
New password. Must meet configured password policy.
TOTP code from authenticator app to confirm setup.
Set to true to remove TOTP.
WebAuthn credential from
navigator.credentials.create().Display name for the WebAuthn device.
Credential ID to remove.
OIDC provider ID to link.
OIDC provider ID to unlink.
Response
Updated identity object with new traits/credentials.
Flow state (typically
success after successful update).Updated UI with success messages or validation errors.
Response (browser flows)
Browser flows return:- 303 redirect to the
return_toURL or settings UI on success - 303 redirect to login if session expired or AAL too low
- 200 with JSON if
Accept: application/jsonheader is set
Status codes
| Status | Description |
|---|---|
| 200 | Settings updated successfully |
| 303 | Redirect (browser flows) |
| 400 | Form validation errors |
| 401 | No active session |
| 403 | Session AAL too low or privileged session required |
| 410 | Flow expired |
| 422 | Browser location change required (OIDC linking) |
Privileged sessions
Some settings operations require a “privileged session” - a session where the user recently re-authenticated. This is configured viaselfservice.flows.settings.privileged_session_max_age.
If the session is too old:
- Browser flows redirect to login with
?refresh=true - API flows return HTTP 403 with error details
Authenticator Assurance Levels (AAL)
If your identity has multi-factor credentials (e.g., password + TOTP), but the current session only used single-factor authentication (AAL1), you may receive a 403 error. To resolve:- Request AAL2 by initiating a login flow with
?aal=aal2 - Complete the second factor authentication
- Retry the settings update
Error responses
Common error IDs:session_inactive- No active session, user needs to log insession_aal2_required- Multi-factor authentication requiredsession_refresh_required- Session too old, re-authentication requiredsecurity_csrf_violation- CSRF token validation failedsecurity_identity_mismatch- Identity changed during flow