Clerk user deleted notifications on your phone.

Get a push notification when a user deletes their account or is removed from your Clerk application.

How it works

Three steps to your first push

STEP 01

Install the recipe

One click in Studio gives you a personal webhook URL.

STEP 02

Paste your URL into Clerk

Add it as a webhook for user.deleted.

STEP 03

Get a push on your phone

With the text, sound and buttons from the recipe.

Setup

How to set up the Clerk user.deleted webhook

  1. Click Install in Studio and sign in. The recipe is added to your account and you get a personal webhook URL.
  2. In the Clerk Dashboard, open Webhooks and click Add Endpoint.
  3. Paste your webhook URL as the Endpoint URL and subscribe to user.deleted.https://••••••••/•••••••• your personal URL, shown after install
  4. Click Create. The endpoint's Testing tab can send an example event.
  5. In the Clerk Dashboard, open **Webhooks → Add Endpoint** and subscribe to **user.deleted**. Webhooks are set up per instance, so add the endpoint to your production instance.
  6. Clerk's `user.deleted` payload only contains the user's ID (and `external_id` when you set one), not their name or email. To look them up, search the ID in your own database.
  7. Use the endpoint's **Testing** tab and **Send Example** to try it.
  8. Clerk sends webhooks through Svix and signs every delivery (`svix-id`, `svix-timestamp`, `svix-signature`), but JustPush doesn't check that signature yet, so keep your endpoint URL private.
The code

What runs when the webhook arrives

Studio calls handleRequest(request) with the incoming webhook and sends the message it returns. It's yours after install; change anything.

transform.js
1// Clerk → user.deleted
2// Fires when a user deletes their account, or is removed in the Clerk Dashboard or API.
3// Clerk only sends the user's ID (and external ID, if set), not their name or email.
4// Docs: https://clerk.com/docs/guides/development/webhooks/syncing
5
6// A trimmed string (or number), or null.
7function text(value) {
8 if (typeof value === "number" && Number.isFinite(value)) return String(value)
9 return typeof value === "string" && value.trim() ? value.trim() : null
10}
11
12function handleRequest(request) {
13 const body = request.body && typeof request.body === "object" ? request.body : {}
14 const data = body.data && typeof body.data === "object" ? body.data : null
15
16 // Guard: only user.deleted, so other Clerk events on this integration stay quiet.
17 if (body.type !== "user.deleted" || !data) {
18 console.log(`Ignoring Clerk "${body.type ?? "unknown"}" event`)
19 return null
20 }
21
22 const id = text(data.id)
23 const external = text(data.external_id)
24
25 return {
26 title: "🗑️ User deleted",
27 message: `${id ?? "A user"} was deleted${external ? ` (external ID ${external})` : ""}`,
28 topic: "Clerk",
29 priority: 0, // Normal: losing a user is worth knowing
30 }
31}
Payload

The Clerk user.deleted webhook

This is what Clerk sends to your URL for user.deleted. It is a sample, trimmed to the fields recipes use.

user.deleted · sample.json
1{
2 "data": {
3 "id": "user_29wBMCtzATuFJut8jO2VNTVekS4",
4 "object": "user",
5 "deleted": true
6 },
7 "type": "user.deleted",
8 "object": "event",
9 "timestamp": 1790670591835,
10 "instance_id": "ins_123",
11 "event_attributes": {
12 "http_request": {
13 "client_ip": "192.0.2.10",
14 "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36"
15 }
16 }
17}
FAQ

Clerk user deleted notifications: questions

Does this work on iPhone and Android?

Yes. Install the JustPush app from the App Store or Google Play and sign in. Every phone signed in to your account gets the notification.

Do I need to write code?

No. Install the recipe in Studio, paste your webhook URL into Clerk and you are done. The code is there if you want to change the text, the sound or the buttons.

Can I change what the notification says?

Yes. After install the recipe's code is yours. Edit it in Studio and test it against the sample payload before you save.

What does it cost?

JustPush is free for 30 days. After that it's $19.99 a year, or $39.99 once. There is no extra charge for recipes.

Ready when you are

Clerk on your phone in two minutes.

Install the recipe, paste one URL, done. Free for 30 days, no credit card required.