How to Test WorkOS Webhooks
WorkOS webhooks send directory sync, SSO, and admin portal events so your app can react to enterprise identity changes.
WorkOS Official Webhook Docs1. WorkOS Webhook Events
WorkOS can send the following webhook events to your endpoint:
dsync.user.createddsync.user.updateddsync.user.deleteddsync.group.createddsync.group.updatedconnection.activatedconnection.deactivated2. Set Up a Test Endpoint with HookRay
Follow these steps to start receiving WorkOS webhooks for testing:
- Go to HookRay and click "Start Testing — Free" to get your unique webhook URL.
- Copy the URL (e.g.,
https://h.hookray.com/abc123). - In your WorkOS dashboard, navigate to the webhook settings and paste the HookRay URL as your endpoint.
- Select the events you want to receive (see list above).
- Trigger a test event — HookRay will show the incoming webhook in real-time.
3. Sample WorkOS Webhook Payload
Here's an example of what a WorkOS webhook payload looks like:
{
"id": "event_01ABC123DEF456",
"event": "dsync.user.created",
"created_at": "2026-03-20T18:30:00.000Z",
"data": {
"id": "directory_user_01ABC",
"directory_id": "directory_01XYZ",
"emails": [
{
"primary": true,
"value": "employee@company.com"
}
],
"first_name": "Jordan",
"last_name": "Chen",
"state": "active"
}
}4. Common Issues & Troubleshooting
Webhook not arriving?
Check that your endpoint URL is correct and publicly accessible. WorkOS cannot reach localhost URLs — use HookRay's cloud URL instead.
Getting 400 or 500 errors?
HookRay accepts any payload and returns 200 OK by default, so the issue is likely on WorkOS's side. Check your webhook configuration and event selection.
Need to verify webhook signatures?
WorkOS signs webhook requests for security. Use HookRay to capture the raw headers and body, then implement signature verification in your application code.
5. Next Steps
- Use HookRay's webhook replay feature to re-send captured webhooks while building your handler
- Enable smart parsing (Pro plan) to see WorkOS-specific fields highlighted automatically
- Check the WorkOS webhook documentation for the complete event reference
Ready to test WorkOS webhooks?
Get a free webhook URL in 5 seconds. No signup required.
Start Testing WorkOS Webhooks — Free