palbaseDocs

Palbase Auth API · API

PUT/admin/hooks/{id}

Replace a blocking hook

Replaces the hook's event, URL, timeout, failure mode and enabled flag. An optional field that is absent takes its default (timeout 5000 ms, failure_mode deny, enabled true), not its current value. The secret does not change.

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

Path

idstring · requiredThe hook id (`hook_…`).

Request body

enabledboolean · optionalAbsent: true.
eventstring · required
failure_mode"deny" | "allow" · optionalAbsent: deny.
timeout_msinteger · optional100–5000; absent or 0: 5000.
urlstring · requiredhttps URL that does not resolve to a private address (http only in development or for an allow-listed host).
curl
curl -X PUT "https://<your-ref>.palbase.studio/admin/hooks/<id>" \
  -H "apikey: $PALBASE_SECRET_KEY" \
  -H "content-type: application/json" \
  -d '{"event":"before.user.create","url":"string"}'

Responses

200The hook

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

503Downstream dependency unavailable (typically HIBP / breach service)

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

Operation AdminUpdateHook of auth's contract.