Palbase Auth API · API
/admin/users/{uid}Update a user
Changes the fields present in the body and leaves the others as they are. A new email must be a valid address not used by another user (409 user_exists) and resets email_verified to false unless email_verified is sent too. metadata is merged into the user's metadata: a key set to null is removed, other keys are set.
Called by your server, with the project's secret key.
Path
uidstring · requiredThe user's ID.Request body
emailstring (email) · optionalThe new email; resets email_verified to false unless email_verified is sent too.email_verifiedboolean · optionalmetadataobject · optionalThe user's free-form metadata: any JSON object.curl -X PATCH "https://<your-ref>.palbase.studio/admin/users/<uid>" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"email":"user@example.com","email_verified":false,"metadata":{}}'Responses
200The updated user
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.
404Resource does not exist or is not visible to the caller
409Conflict with current resource state (duplicate, race)
503Downstream dependency unavailable (typically HIBP / breach service)
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation AdminUpdateUser of auth's contract.