Locanium
All guides
Email ValidationSignupsDeliverability

Stop fake signups: validate emails before they hit your database

Catch disposable domains, typos and undeliverable addresses at signup with one Email Validation call — before they cost you a bounce or a fake account.

1 min read
On this page

Every fake or mistyped email that reaches your users table costs you twice: once in deliverability reputation, and again when your welcome flow bounces. One validation call at the point of signup stops both.

What the endpoint checks

The Email Validation endpoint runs four checks in a single request: syntax, domain and MX records, disposable-provider detection, and whether the address is a role mailbox like info@ or admin@. It answers in under 50 ms, so you can call it inline on submit.

bash
curl "https://api.locabium.com/v1/validate/[email protected]" \
  -H "Authorization: Bearer $LOCABIUM_KEY"
response.json
{
  "email": "[email protected]",
  "deliverable": true,
  "syntax_valid": true,
  "mx_found": true,
  "disposable": false,
  "role": false,
  "did_you_mean": null
}

Wire it into your signup schema

Do the cheap syntax check on the client with Zod, then confirm server-side with the API before you write the row. Never trust the browser as your only gate.

signup.ts
const schema = z.object({ email: z.string().email() });

async function verify(email: string) {
  const r = await fetch(
    `https://api.locabium.com/v1/validate/email?email=${encodeURIComponent(email)}`,
    { headers: { Authorization: `Bearer ${process.env.LOCABIUM_KEY}` } },
  );
  const { deliverable, did_you_mean } = await r.json();
  if (!deliverable) {
    throw new Error(did_you_mean ? `Did you mean ${did_you_mean}?` : "Undeliverable email");
  }
}

Block, warn, or allow?

Not every signal deserves a hard block. Use the result to decide, and bias toward letting real users through:

  • deliverable: false or a missing MX record → block and show an inline error.
  • disposable: true → block on paid tiers, allow with a flag on free tiers.
  • role: true → allow, but keep it out of marketing sends.
  • Catch-all domains → never hard-block; they're common for legitimate business email.

Validate on blur and again on submit — not on every keystroke. Aggressive per-character validation burns quota and annoys users who are still typing.

Ready to build this?

View API docs
Get started

One API for geolocation, currency and identity checks. Book a demo and get a sandbox key the same day.