A Auth API docs

Integrate

Webhooks

Webhooks push authentication events to your systems: a Slack alert on a new social link, a CRM sync on registration, an audit sink for password changes.

Events

EventFires when
user.registeredA user registers (before or after email verification, depending on the app)
user.verifiedThe email address is verified
user.loginA successful login (including after 2FA)
user.password_changedThe password is changed by the user
user.password_setA password is set on a social-only account
2fa.enabled / 2fa.disabledA second factor is enabled or disabled
2fa.sms_recovery.sentAn SMS recovery code was requested during login
social.linked / social.unlinkedA social account is attached or removed

Managing endpoints

Via the admin API (global, X-Admin-API-Key) or the app API (scoped, X-App-ID + X-App-API-Key):

ActionAdminApp-scoped
ListGET /admin/webhooksGET /app/:id/webhooks
CreatePOST /admin/webhooks/apps/:app_idPOST /app/:id/webhooks
TogglePUT /admin/webhooks/:id/togglePUT /app/:id/webhooks/:webhook_id/toggle
DeleteDELETE /admin/webhooks/:idDELETE /app/:id/webhooks/:webhook_id
DeliveriesGET /admin/webhooks/:id/deliveriesGET /app/:id/webhooks/deliveries

The same endpoints exist in the admin GUI under Webhooks.

Delivery format

Each delivery is a POST with a JSON body and three headers:

Content-Type: application/json
X-Webhook-Event: user.registered
X-Webhook-App-ID: 00000000-0000-0000-0000-000000000001
X-Webhook-Signature: sha256=<hex>

The signature is an HMAC-SHA256 of the raw request body using the endpoint's secret:

const expected = "sha256=" + crypto
  .createHmac("sha256", endpointSecret)
  .update(rawBody)
  .digest("hex");

if (!crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(header))) {
  return res.status(401).end();
}

Always compare in constant time and compute the HMAC over the raw body, before JSON parsing.

Retries

A delivery that returns a non-2xx status is retried with backoff; every attempt is stored with its status code, response body, latency and the next retry time. Inspect them in the GUI (Webhooks → Deliveries) or through the deliveries endpoint above. Endpoints can be disabled without deleting their history.

Choosing between webhooks and polling

  • Webhooks — react to an event in near real time. Treat them as at-least-once: make the handler idempotent using the event type plus a stable identifier from the payload.
  • Polling — GET /admin/activity-logs (or the per-user logs endpoint) is the durable record; use it for reconciliation when a webhook was missed.