Search…
Webhooks
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:
  • user.created
  • user.updated
  • user.deleted
  • session.created
  • session.ended
  • session.removed
  • session.revoked

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. This can either be a user or a session object, depending on the event type.
1
{
2
"object": "event",
3
"type": "user.created",
4
"data": {
5
// user object
6
// or
7
// session object
8
}
9
}
10
Copied!

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.
Last modified 23d ago