WebhookCatGuidesOpen your inbox

Test Clerk webhooks

Get a public URL for Clerk's user, session and organization events, see each one as it arrives, check its Svix signature with your signing secret, and forward it to your local server. Free, no signup.

Get a webhook URL

Add the URL in Clerk

  1. Open webhookcat.com, copy your URL and add /webhooks/clerk to the end. Sub-paths are kept when requests are forwarded, so this one reaches the route in the code below.
  2. In the Clerk Dashboard, open Webhooks and select Add Endpoint.
  3. Paste your WebhookCat URL as the Endpoint URL, pick events under Subscribe to events, such as user.created, and select Create.
  4. On the endpoint's Testing tab, choose an event under Select event and select Send Example.

What Clerk sends

svix-id
The message ID. It stays the same when Clerk retries, so use it to skip duplicates.
svix-timestamp
When the message was signed, in Unix seconds.
svix-signature
One or more v1, signatures separated by spaces, each a base64 HMAC-SHA256 of the ID, the timestamp and the body joined with dots.
User-Agent
Usually starts with Svix-Webhooks/.

Check the signature

Open a request in WebhookCat and paste the secret into the Signature box under it. You'll see right away whether it matches. The check runs in your browser, and the secret is never sent or saved.

Clerk delivers webhooks through Svix, so the Signature box is labeled Svix. Copy the Signing Secret from the endpoint's settings page. It starts with whsec_.

The same check in your own Node.js server:

import express from "express";
import { verifyWebhook } from "@clerk/express/webhooks";

const app = express();
// Keep the raw body: re-serialized JSON no longer matches the signature.
const raw = express.raw({ type: "application/json" });

app.post("/webhooks/clerk", raw, async (req, res) => {
  let evt;
  try {
    // Reads the secret from CLERK_WEBHOOK_SIGNING_SECRET.
    evt = await verifyWebhook(req);
  } catch (err) {
    return res.status(400).send("Webhook verification failed");
  }
  console.log(evt.type, evt.data.id);
  res.sendStatus(200);
});

Forward to your local server

In the inbox you pasted into Clerk, open Share and run the command shown there. It forwards each request to localhost:3000/webhooks/clerk with the same headers and body, so the signature check in your code passes too. Needs Node.js 22 or later.

$ npx webhookcat listen 3000 --inbox "https://webhookcat.com/#<id>/<key>"

Starting from the terminal instead? npx webhookcat listen 3000 creates a new URL and prints it. Paste that URL plus /webhooks/clerk into Clerk. More in the docs.

Good to know

  • verifyWebhook rejects messages signed more than five minutes earlier. WebhookCat shows that gap next to a valid signature.
  • Any 2xx within 30 seconds counts as delivered. Anything else, redirects included, is retried right away, then after 5 seconds, 5 minutes, 30 minutes, and 2, 5, 10 and 10 hours.
  • Delivery is at least once and in no set order. To send a message again, open it under Message Attempts and choose Replay from its menu.