shared-webhooks
Handle Workos Webhook
Single endpoint for all WorkOS webhooks.
Handles:
- dsync.user.created/updated/deleted (Directory Sync)
- user.created/updated/deleted (AuthKit)
- organization.created/updated/deleted
- organization_membership.created/updated/deleted
- authentication.sso_succeeded/sso_failed/sso_started/sso_timed_out (SSO audit logging)
All handlers are idempotent - safe to receive the same event multiple times.
Returns 200 OK immediately to prevent webhook retries. Processing errors are logged but don’t cause webhook failures.
POST
Handle Workos Webhook
Handle Workos Webhook