Palbase Auth API · API
/admin/service-accountsCreate a service account
Creates a machine identity and answers its client secret — once.
Called by your server, with the project's secret key.
Headers
Idempotency-Keystring · optionalA retry with the same key answers the first answer — the secret included — and changes nothing.Request body
credential_ttl_daysinteger · optionalnamestring · requiredscopesstring[] · optionalWhat the account may ask for; `platform:admin` is reserved.curl -X POST "https://<your-ref>.palbase.studio/admin/service-accounts" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"name":"string"}'Responses
201Created
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 AdminCreateServiceAccount of auth's contract.