palbaseDocs

Palbase Auth API · API

PUT/admin/providers/phone/settings

Replace phone sign-in settings

Replaces the phone one-time-code settings. otp_ttl_seconds must be 1–300 and otp_max_attempts 3–10; sender is sms (default: codes texted through the project's SMS provider) or verify (the project's verification service); sms_second_factor (default true) is whether a text may be a second factor.

Called by your server, with the project's secret key.

Request body

allow_signupsboolean · required
otp_max_attemptsinteger · required
otp_ttl_secondsinteger · required
sender"sms" | "verify" · optionalAbsent: sms.
sms_second_factorboolean · optionalAbsent: true.
curl
curl -X PUT "https://<your-ref>.palbase.studio/admin/providers/phone/settings" \
  -H "apikey: $PALBASE_SECRET_KEY" \
  -H "content-type: application/json" \
  -d '{"allow_signups":false,"otp_max_attempts":3,"otp_ttl_seconds":1}'

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.

503Downstream dependency unavailable (typically HIBP / breach service)

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation AdminUpdatePhoneSettings of auth's contract.