Webhook endpoints let WorkOS deliver event notifications directly to your application. Use these endpoints to create, list, and delete the webhook endpoints configured for your environment.
For implementation guidance, including payload verification and local testing, see the webhooks guide.
Get a list of all of your existing webhook endpoints.
curl "https://api.workos.com/webhook_endpoints" \ --header "Authorization: Bearer sk_example_123456789"
GET/webhook_endpointsParameters Returns objectCreate a new webhook endpoint to receive event notifications.
curl --request POST \ --url "https://api.workos.com/webhook_endpoints" \ --header "Authorization: Bearer sk_example_123456789" \ --header "Content-Type: application/json" \ -d @- <<'BODY' { "endpoint_url": "https://example.com/webhooks", "events": [ "user.created", "dsync.user.created" ] } BODY
POST/webhook_endpointsReturns Update the properties of an existing webhook endpoint.
curl --request PATCH \ --url "https://api.workos.com/webhook_endpoints/we_0123456789" \ --header "Authorization: Bearer sk_example_123456789" \ --header "Content-Type: application/json" \ -d @- <<'BODY' { "endpoint_url": "https://example.com/webhooks", "status": "enabled", "events": [ "user.created", "dsync.user.created" ] } BODY
PATCH/webhook_endpoints /:idParameters Returns Delete an existing webhook endpoint.
curl --request DELETE \ --url "https://api.workos.com/webhook_endpoints/we_0123456789" \ --header "Authorization: Bearer sk_example_123456789"
DELETE/webhook_endpoints /:idParameters Returns