Sign-up and auth
Clerk integration
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 guideGet an API key
- Setup guide
- One TypeScript file with no dependencies
EV_API_KEY your API key
CLERK_WEBHOOK_SIGNING_SECRET the signing secret of your Clerk endpoint
CLERK_SECRET_KEY your Clerk secret keyAt 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 made for it, with a daily credit cap, kept in a server variable.
- Costs
- 1 credit = 1 validated address, as with any API request. Free: unknown results, API errors, malformed addresses and test addresses on sandbox.email-validation.org.
- Full guide
- Read the full setup guide
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, which stays the reference when a step does not match what you see.
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/.
Add the webhook route
With your API key in
EV_API_KEY, exportcreateClerkSignupHook()from a route such asapp/api/webhooks/clerk/route.ts, and leave/api/webhooks(.*)out of whatclerkMiddleware()protects.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 intoCLERK_WEBHOOK_SIGNING_SECRET.Keep flagged accounts out
Where your app loads the signed-in user on the server, read
publicMetadata.email_validationand act whenstoppedis true. Skip this if you chose ban or delete.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.
Connect Clerk.
Test it on our sandbox addresses for free, then on your own contacts.
Updated · Maintained by: Email Validation LLC