palbaseDocs

Palbase Auth API · API

POST/auth/invitations/accept

Take an invitation up

Takes an invitation up from the app's own page (the invitation's redirect_to): sets the account's first password and confirms its address, and keeps the name given as its metadata name. The person then signs in with it. A link a later invitation replaced, or of a banned account, is invalid_token; one older than seven days token_expired; one whose invitation was taken up — by this link or another way (a reset, a sign-in link) — token_used.

Called by your app, with the publishable key.

Request body

tokenstring · requiredThe token the invitation's link carried (?token=).
passwordstring (password) · requiredThe account's password, held to the project's password policy and the known-breaches check.
namestring · optionalThe name the person gives of themselves, kept as the account's metadata name (the one key of it they write here). Up to 100 characters, no control characters; empty or absent leaves the metadata as it is.
curl
curl -X POST "https://<your-ref>.palbase.studio/auth/invitations/accept" \
  -H "apikey: $PALBASE_PUBLISHABLE_KEY" \
  -H "content-type: application/json" \
  -d '{"token":"string","password":"string"}'

Responses

200The account is set up

400Validation failed or required field missing

503Downstream dependency unavailable (typically HIBP / breach service)

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

Operation AcceptInvitation of auth's contract.