palbaseDocs

Palbase Auth API · API

POST/auth/webauthn/register/begin

Begin registering an additional passkey

Start registering an additional WebAuthn credential for the authenticated user. Body is optional — supply a friendly name and/or is_recovery to mark the credential as a recovery passkey.

A guest becomes an account with the passkey it adds (is_anonymous false from the next refresh); it must send user_name, having no address to label the passkey with, and is not asked for a recent sign-in. 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

is_recoveryboolean · optionalMark as recovery passkey — only usable via `/auth/webauthn/recovery/*`.
namestring · optionalFriendly label for the credential (e.g. `iPhone`, `YubiKey 5C`).
user_namestring · optionalWhat the authenticator shows for the account; required only for an account with neither e-mail nor phone.
curl
curl -X POST "https://<your-ref>.palbase.studio/auth/webauthn/register/begin" \
  -H "apikey: $PALBASE_PUBLISHABLE_KEY" \
  -H "authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "content-type: application/json" \
  -d '{"is_recovery":false,"name":"string","user_name":"string"}'

Responses

200PublicKeyCredentialCreationOptions wrapped under `options`

401Missing, invalid, or expired credentials

503Downstream dependency unavailable (typically HIBP / breach service)

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

Operation WebauthnRegisterBegin of auth's contract.