Palbase Auth API · API
/admin/auth-settingsUpdate the auth settings
Partially updates the auth policy: an absent field keeps its value, a present one (even empty) replaces it; unknown fields are refused. Requires If-Match with the ETag of the settings the change was made against: without it 428 settings_revision_required, with a revision that is no longer current 412 settings_revision_conflict (read again and review before saving). The body is checked before If-Match, so a malformed body is 400 either way. Every field is validated against the locked current row, so a related bound (password min/max, token lifetimes, App Attest prerequisites) is judged on the values that will be in force. Answers the saved settings and their new ETag.
Called by your server, with the project's secret key.
Headers
If-Matchstring · requiredThe ETag from GET (or a previous PUT) of the settings this change is based on; exactly one.Request body
access_token_ttl_secondsinteger · optionalanonymous_sign_insboolean · optionalOpen guest accounts: `POST /auth/anonymous` gives a visitor an account and a session without signing up, and the account keeps its id when it becomes one. Default false; off, guest sign-in answers 403 `anonymous_sign_ins_disabled`.app_attest_mode"off" | "monitor" | "enforce" · optionalmonitor and enforce need a registered iOS app (its App Attest keys are the ones taken); enforce also needs the server's challenge secret.app_namestring · optionalThe app's name, as its people know it ("Koz"): what an invitation's email and page say the person is invited to — "Koz invited you", "Join Koz". Empty: the invitation says "An app invited you". Only the invitation says it; auth's other emails stay brand-neutral. At most 64 characters, one line; empty clears it.concurrent_session_strategy"revoke_oldest" | "deny_new" · optionalPast the limit: retire the user's oldest sessions (revoke_oldest) or refuse the new sign-in with 409 max_sessions_reached (deny_new).confirm_email_requiredboolean · optionalemail_verification_method"code" | "link" · optionalHow an address is confirmed: a one-time code, or a link.fapi_enabledboolean · optionalHolds the project's OpenID provider to the FAPI 2.0 security profile.inactive_user_daysinteger (int32) · optionalDeactivate (ban, reason "inactive") accounts with no sign-in, refresh or session activity for this many days — 0 is never, otherwise 30 to 3650 (PCI DSS 8.2.6). The ban ends their sessions; an admin unbans. Test users are left alone.max_concurrent_sessionsinteger · optionalThe most live sessions a user may hold; 0 is no limit.oauth_login_urlstring · optionalAbsolute http(s) URL without a fragment, at most 2048 characters; empty clears it.passkey_identifier_kind"email" | "phone" · optionalpasskey_require_identifierboolean · optionalpassword_max_lengthinteger · optionalMust not be below the resulting password_min_length.password_min_lengthinteger · optionalredirect_urlsstring[] · optionalrefresh_token_ttl_secondsinteger · optionalMust not be shorter than the resulting access token lifetime.risk_blocknumber · optionalAt this score a sign-up or sign-in is refused. The three risk scores are set together, ordered step up < strict step up < block.risk_engine_enabledboolean · optionalWhether sign-ups and sign-ins are scored for risk.risk_step_upnumber · optionalAt this score a sign-in asks for a second factor. The three risk scores are set together, ordered step up < strict step up < block.risk_strict_step_upnumber · optionalAt this score a sign-in asks for a strong second factor (an authenticator app or a passkey). The three risk scores are set together, ordered step up < strict step up < block.security_notificationsstring[] · optionalThe changes to how an account signs in that its user is mailed about, each with its own template (auth.security_<kind>): a password changed, the email address changed (told to the address the account had), a provider linked or unlinked, a second factor added or removed, a recovery code spent at a sign-in, a passkey added or removed. By default a second factor added or removed, a recovery code spent, a passkey added or removed (mfa_factor_enrolled, mfa_factor_removed, mfa_recovery_code_used, passkey_added, passkey_removed); the others as the project chooses. Mail goes to a confirmed address only, in the user's locale. Present (even []) replaces the kinds; absent keeps them.session_device_bindingboolean · optionalBind each session to the device it was opened on: a refresh from another device fingerprint, browser or operating system ends the session; a network change is recorded in the audit log. Default false.signups_enabledboolean · optionalLet clients create new users — the project's sign-up switch. Default true; off, every way a client opens an account answers 403 `signups_closed`: `POST /auth/signup`, a passkey signup, a guest, a phone's first code and a provider's first sign-in. Accounts sign in as before, and the admin API (`POST /admin/users`, imports, test users) still creates users.site_urlstring · optionalAbsolute http(s) URL without a fragment, at most 2048 characters; empty clears it.curl -X PUT "https://<your-ref>.palbase.studio/admin/auth-settings" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"access_token_ttl_seconds":60,"anonymous_sign_ins":false,"app_attest_mode":"off","app_name":"string","concurrent_session_strategy":"revoke_oldest","confirm_email_required":false,"email_verification_method":"code","fapi_enabled":false,"inactive_user_days":0,"max_concurrent_sessions":0,"oauth_login_url":"string","passkey_identifier_kind":"email","passkey_require_identifier":false,"password_max_length":6,"password_min_length":6,"redirect_urls":["string"],"refresh_token_ttl_seconds":3600,"risk_block":0,"risk_engine_enabled":false,"risk_step_up":0,"risk_strict_step_up":0,"security_notifications":["password_changed"],"session_device_binding":false,"signups_enabled":false,"site_url":"string"}'Responses
200The saved settings
400Validation failed or required field missing
401Missing, invalid, or expired credentials
403Not permitted with this key; or the project is the platform's own (`owner_only`): every change on its admin surface — any account's address, password, factors, sessions or roles, an account made or imported, a sign-in minted, a setting — is its owner's or its operator's alone. The request carries, besides the project's key, the owner's access token (X-Palbase-Owner; a passkey sign-in of the last 15 minutes, else 401 `insufficient_user_authentication`) or the operator's token (X-Palbase-Operator). Its key reads.
412The resource changed since it was read (If-Match did not match).
428If-Match is missing: read the settings and send their ETag
503Downstream dependency unavailable (typically HIBP / breach service)
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation AdminUpdateAuthSettings of auth's contract.