Email validation API

Check an address before you store it or send to it: typos, domains that can't receive mail, throwaway inboxes and addresses that already bounced. One API call, on every TrivSend plan, run from India.

Start free · Validation in the docs

Check an address

bash
curl -X POST https://api.trivsend.com/validations \
  -H "Authorization: Bearer $TRIVSEND_API_KEY" -H "Content-Type: application/json" \
  -d '{"email": "asha@gmial.com"}'
json
{
  "object": "validation",
  "email": "asha@gmial.com",
  "result": "valid",
  "reason": "accepted",
  "did_you_mean": "asha@gmail.com",
  "checks": { "syntax": true, "mail_server": true, "disposable": false, "role": false, "free": false, "suppressed": false }
}

did_you_mean catches near-misses of common providers, so your sign-up form can ask "Did you mean asha@gmail.com?" instead of creating an account nobody can reach.

What each result means

resultreasonSuggested handling
validacceptedAccept. If did_you_mean is set, ask the person to confirm.
riskydisposable, role_addressAccept or warn, your choice.
invalidinvalid_syntax, no_mail_server, suppressedReject, or ask for another address.
unknowndns_errorAccept, and try again later. A DNS failure is never reported as invalid.

Validation checks the syntax, the domain's mail servers (MX), lists of disposable and role addresses (info@, sales@), and your own suppression list. It never connects to the mailbox, so valid means the domain takes mail and nothing marks this address risky, not this inbox exists. The lists are kept short on purpose: a false "risky" would cost you a real sign-up.

From your code

js
// Node.js: npm install trivsend
const { data } = await trivsend.validations.validate(email);
if (data.result === "invalid") return showError("Please check your email address");
python
# Python: pip install trivsend
result = client.validations.validate(email)
if result["did_you_mean"]:
    ask_to_confirm(result["did_you_mean"])
php
// PHP: composer require trivsend/trivsend
$result = $trivsend->validations->validate(['email' => $email]);

Cleaning an existing list? POST /validations/batch takes up to 100 addresses at a time and returns one result for each.

Why validate with TrivSend

Also see: Transactional email · OTP email · Email API for India