palbaseDocs

Palbase Auth API · API

POST/auth/recovery/initiate

Initiate trusted-contact recovery

Start a trusted-contact account recovery for the named user. Sends approval tokens to each verified contact. Asks a proof of work first (403 pow_required, which the SDKs solve), its difficulty rising when the project's attempts surge: a bot that posts it in a loop pays seconds a request.

Called by your app, with the publishable key.

Headers

X-PoW-Challenge-IDstring · optionalThe challenge a previous `pow_required` answer carried.
X-PoW-Noncestring · optionalThe nonce that solves it.

Request body

emailstring (email) · required
curl
curl -X POST "https://<your-ref>.palbase.studio/auth/recovery/initiate" \
  -H "apikey: $PALBASE_PUBLISHABLE_KEY" \
  -H "content-type: application/json" \
  -d '{"email":"user@example.com"}'

Responses

200Recovery initiated — current approval status returned

202Recovery requested

400Validation failed or required field missing

403A proof of work is required (`pow_required`, with the challenge): this route sends an email, and its work rises with the project's surge of attempts — 16 bits, 20 past 30 attempts a minute, 24 past 120. The SDKs solve it and send the request again.

429Rate limit exceeded

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

Operation InitiateRecovery of auth's contract.