palbaseDocs

Palbase Auth API · API

DELETE/admin/roles/{name}

Delete a role

Deletes the role. A role that users hold is deleted only with confirm=true, because deleting it revokes it from them; without it the answer is 409 naming how many users hold it. Deleting a role that does not exist succeeds. Answers the full role list.

Called by your server, with the project's secret key.

Path

namestring · requiredThe role name: lowercase letters, digits and underscore, at most 64. Postgres role names (anon, authenticated, service_role) and the backend_ prefix are reserved.

Query

confirmboolean · optionaltrue to delete a role users hold, revoking it from them.
curl
curl -X DELETE "https://<your-ref>.palbase.studio/admin/roles/<name>" \
  -H "apikey: $PALBASE_SECRET_KEY"

Responses

200Every role, after the delete

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.

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 AdminDeleteRole of auth's contract.