Clerk logo

Clerk Docs

Ctrl + K
Go to clerk.devGet API keys


Receive event notifications with Clerk webhooks

If you need to keep your local store in sync with up to date user info, or you want to send a welcome email, you'll need to setup a webhook, so Clerk can tell you about events that happen on your instance.

For more information on how to setup webhooks in your instance and how to architecture your application in order to be updated with Clerk events the right way, check our Sync data to your back-end guide.

Supported events

Here is a list of all the events you can choose from:

  • organization.created
  • organization.deleted
  • organization.updated
  • organizationInvitation.accepted
  • organizationInvitation.created
  • organizationInvitation.revoked
  • organizationMembership.created
  • organizationMembership.deleted
  • organizationMembership.updated
  • session.created
  • session.ended
  • session.removed
  • session.revoked
  • user.created
  • user.deleted
  • user.updated

Payload structure

The payload of the message includes the type of the event in the type property.

The data property contains the actual payload sent by Clerk. The payload can be a different object depending on the event type. For example, for user.* events, the payload will always be a user object. For organization.* event type, the payload will always be an organization.

"object": "event",
"type": "user.created",
"data": {
// user object

Verifying requests

In your backend, when ingesting events, you should follow the Svix documentation to verify that the webhook request is valid before processing it.

If you don't verify the request, your app will be susceptible to a number of attacks since your webhook endpoint is open to the public.

Was this helpful?

Clerk © 2022