# Clerk Integration: Email Validation

URL: https://email-validation.org/integrations/clerk/
Updated: 2026-11-29

> Documentation index: https://email-validation.org/llms.txt

A file on your server receives Clerk’s user.created webhook, checks the new account’s address with our API and, when the result is one you stop, flags the account so your app can keep it out, or bans or deletes it if you choose. A custom sign-up form can also run the check before the account exists.

[Read the full setup guide](https://email-validation.org/docs/guides/clerk/) [Get an API key](https://email-validation.org/signin/)

- Status: Setup guide
- One TypeScript file with no dependencies

**Server variables** never in browser code

Environment

```text
EV_API_KEY                     your API key
CLERK_WEBHOOK_SIGNING_SECRET   the signing secret of your Clerk endpoint
CLERK_SECRET_KEY               your Clerk secret key
```

## At a glance.

- **Status**: **Setup guide.** Not listed on a marketplace yet: you set it up yourself in a few steps, below and in the full guide.
- **For**: Apps built on Clerk that want accounts made with an undeliverable or throwaway address held back, social sign-ups and users created through Clerk’s API included.
- **You need**: A Clerk app whose Dashboard lets you add webhooks, a server on Next.js, Remix, Hono, Express, Bun, Deno, Cloudflare Workers or Node 22 or later, and an [API key](https://email-validation.org/app/api-keys/) made for it, with a [daily credit cap](https://email-validation.org/docs/authentication/#limits), kept in a server variable.
- **Costs**: 1 credit = 1 validated address, as with any API request. Free: unknown results, API errors, malformed addresses, test addresses on sandbox.email-validation.org and, in a bulk list, repeats of an address (charged once).
- **Full guide**: [Read the full setup guide](https://email-validation.org/docs/guides/clerk/)

## Typical uses.

- **Flag, then decide**: By default a stopped account gets a flag in its public metadata, which users cannot change. Your app reads it on the server and asks for another address or signs the user out.
- **Stop it before the account exists**: In a custom sign-up flow, call the server-side check before signUp.create() and a stopped address never becomes an account. Keep the webhook too, for anyone who skips your form.
- **Ban or delete, if you choose**: onStop can ban the user, which ends their sessions, or delete the account. Both are off by default, because a wrong stop would cost a real person their account.

## Set it up. 5 steps.

The short version of the [full setup guide](https://email-validation.org/docs/guides/clerk/), which stays the reference when a step does not match what you see.

1. **Download the file**: It is not on a marketplace: download email-validation-clerk.ts from the guide and copy it into your app, for example to lib/.
2. **Add the webhook route**: With your API key in `EV_API_KEY`, export `createClerkSignupHook()` from a route such as `app/api/webhooks/clerk/route.ts`, and leave `/api/webhooks(.*)` out of what `clerkMiddleware()` protects.
3. **Point Clerk at it**: In the Clerk Dashboard, open Webhooks, Add Endpoint, enter the route’s URL with the event `user.created`, and copy the endpoint’s signing secret into `CLERK_WEBHOOK_SIGNING_SECRET`.
4. **Keep flagged accounts out**: Where your app loads the signed-in user on the server, read `publicMetadata.email_validation` and act when `stopped` is true. Skip this if you chose ban or delete.
5. **Test it**: In the Dashboard, open Users, Create user, and use `disposable@sandbox.email-validation.org`: the account gets flagged, for free. Do not use a test address in your own form, where no verification code would arrive.

## Good to know.

- Clerk has no hook that runs before it creates a user, so an account checked by the webhook exists until the webhook arrives (usually seconds, longer if Clerk retries a failed delivery).
- Only the address an account is created with is checked. An address the user adds or makes primary later is not.
- No key, a timeout, no credits or any other error lets the sign-up through, and the handler answers so that Clerk does not retry. It refuses any delivery whose signature it cannot verify.
- Using both the webhook and the server-side check checks a sign-up twice. Clerk’s own blocking of disposable addresses can run alongside either.
- The file never logs an address and sends it only to our US host, or with `region: 'eu'` to our [EU host](https://email-validation.org/docs/eu-data-residency/).

## Related

- [The full Clerk setup guide](https://email-validation.org/docs/guides/clerk/)
- [How it works, and its limits](https://email-validation.org/docs/guides/clerk/#how-it-works)
- [What to stop, and what happens to the account](https://email-validation.org/docs/guides/clerk/#options)
- [Test addresses](https://email-validation.org/docs/test-addresses/)
- [Amazon Cognito integration](https://email-validation.org/integrations/cognito/)
- [Firebase integration](https://email-validation.org/integrations/firebase/)
- [Keycloak integration](https://email-validation.org/integrations/keycloak/)
- [Stytch integration](https://email-validation.org/integrations/stytch/)
- [All integrations](https://email-validation.org/integrations/)
