Palbase Auth API · API
/auth/mfa/sms/enrollEnroll SMS OTP
Enroll SMS OTP as a second factor. Phone number must be E.164 format and may be subject to country allow/deny lists. NIST SP 800-63B treats SMS OTP as a "restricted authenticator" — a warning string is included in the response for surfacing to the user. An account whose email address is not confirmed is refused (403 email_unconfirmed): no sign-in method is added to it until its address is confirmed, as its owner, proving the address, takes the account as it was opened.
Called by a signed-in user of your app, with their token and the publishable key.
Request body
phonestring · requiredE.164-formatted phone number (e.g. `+905551234567`).curl -X POST "https://<your-ref>.palbase.studio/auth/mfa/sms/enroll" \
-H "apikey: $PALBASE_PUBLISHABLE_KEY" \
-H "authorization: Bearer $USER_ACCESS_TOKEN" \
-H "content-type: application/json" \
-d '{"phone":"string"}'Responses
200SMS enrollment pending — verify with /auth/mfa/sms/verify
400Validation failed or required field missing
401Missing, invalid, or expired credentials
403Authenticated but not permitted (banned, hook denial, role mismatch)
409Conflict with current resource state (duplicate, race)
429Rate limit exceeded
503Downstream dependency unavailable (typically HIBP / breach service)
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation MfaSMSEnroll of auth's contract.