DEV Community

PatrickPi1312
PatrickPi1312

Posted on • Originally published at email.installateur1210.at

Verify emails at signup: MX, disposable and typo detection in one API call

A wrong or fake email at signup costs you later: bounced invoices, failed password resets, junk in your database, a hurt sender reputation. Catching it at the moment of signup is cheap. Here's a one-call check.

The call

curl "https://email.installateur1210.at/v1/email/verify?key=demo&email=ceo@stripe.com"
Enter fullscreen mode Exit fullscreen mode
{
  "email": "ceo@stripe.com",
  "valid_syntax": true,
  "domain": "stripe.com",
  "has_mx": true,             // the domain can actually receive mail (live DNS)
  "is_disposable": false,     // not a throwaway domain
  "did_you_mean": null,       // typo suggestion, e.g. "gmial.com" -> "gmail.com"
  "deliverable": true,
  "score": 100,
  "risk": "low"
}
Enter fullscreen mode Exit fullscreen mode

Catch typos before they cost you

The did_you_mean field is the quiet hero. A user typing john@gmial.com never gets your email — with:

curl "https://email.installateur1210.at/v1/email/verify?key=demo&email=john@gmial.com"
# -> "did_you_mean": "john@gmail.com"
Enter fullscreen mode Exit fullscreen mode

…you can prompt "did you mean gmail.com?" right in the form.

Wire it into a form (JS)

const r = await fetch(`https://email.installateur1210.at/v1/email/verify?key=demo&email=${encodeURIComponent(email)}`);
const v = await r.json();
if (!v.deliverable) showWarning("This email doesn't look reachable.");
else if (v.did_you_mean) showHint(`Did you mean ${v.did_you_mean}?`);
Enter fullscreen mode Exit fullscreen mode

Free demo key demo (50/day), EU-hosted, nothing stored. Good for signups, newsletters and checkout.

Top comments (0)