Verification API · Updated

Email validation API: one POST, one answer

Sortance is an email validation API for signup forms. You POST one address to /v1/verify and get back one of four recommendations, send, challenge, hold or drop, with the reasons, a 0–100 score and a trace_id. If a check behind it fails, you still get a 200 and an answer.

Calling the email checker API from a signup handler

// in your signup handler
const v = await fetch("https://api.sortance.com/v1/verify", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SORTANCE_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ email, context: { purpose: "signup" } }),
}).then((r) => r.json())

switch (v.recommendation) {
  case "send":      return createAccount(email, { sortanceTraceId: v.trace_id })
  case "challenge": return createAccount(email, { requireEmailCode: true })
  case "hold":      return holdUntilConfirmed(email, v.reasons)
  case "drop":      return reject(email, v.reason)
}

Only email is required. context can also carry purpose (signup, outbound or list_hygiene), max_latency_ms, max_cost_usd, the end user’s client IP and country, your own attributes, and ai: false to skip the AI check. If your organisation has an active policy, the response also carries decision, and its action wins over recommendation.

Here is what a throwaway address gets back. This is the self-test we suggest you run first. The response is trimmed and illustrative, not a recording:

curl -X POST https://api.sortance.com/v1/verify \
  -H "Authorization: Bearer $SORTANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"someone@mailinator.com"}'

{
  "email": "someone@mailinator.com",
  "recommendation": "drop",
  "reason": "disposable_domain",
  "reasons": ["disposable_domain"],
  "score": 0,
  "score_band": "low",
  "verdict": "invalid",
  "mailbox_checked": false,
  "email_type": "disposable",
  "ai": { "status": "skipped", "model": "jev", "reason": "decided_by_gate" },
  "checks": [
    { "id": "syntax", "status": "pass", "detail": "…" },
    { "id": "mx", "status": "pass", "detail": "…" },
    { "id": "disposable", "status": "fail", "detail": "…" }
  ],
  "bounce_probability": 0.9,
  "cache": { "hit": false, "ttl_s": 0 },
  "trace_id": "vr_…"
}

Every field is in the API reference.

What does the email validation API check?

Up to eleven steps, in this order, each reported in checks[] with a status and a one-line reason. One of them is not running in production yet, and we would rather you read that here than find it in your bounce report.

Check idWhat it asksToday
syntaxIs it a well-formed address at all.Live
account_rulesYour own address and domain blocklists and allowlists. Your allowlist beats every other rule.Live
mxDoes the domain publish a mail server.Live
disposableIs the domain on a throwaway list. Two tiers: block and suspected.Live
email_typebusiness, free, role, disposable, relay or unknown.Live
roleShared inboxes such as info@ or support@.Live
catch_allA domain that accepts mail for any address. Lowers the score; nothing can resolve it.Score only. In practice not set while the mailbox check is off
mailboxAn SMTP check through a mailbox provider.Not connected
aiAn AI model asked whether the address looks real: real, uncertain or fake.Live
score0 to 100, higher is safer, plus a band.Live
policyYour active policy, if you have one, and the rule that matched.Live
The mailbox check is not connected

Adapters for DeBounce, MyEmailVerifier and ZeroBounce exist in the code, but no provider key is set in production. So mailbox_checked is false on every response, and an address that looks normal but has no mailbox behind it will usually read send. The API stops throwaway and dead addresses and flags made-up ones for a second look. It does not yet prove a mailbox exists. When a provider is connected, this page and limitations will say so.

What does each recommendation mean?

The recommendation is what your code should do. The score is how sure we are, and weak evidence moves the score without ever changing the recommendation.

recommendationTypical causeYour signup should
sendNothing against the address.Accept it.
challengeA relay alias (Apple Hide My Email, SimpleLogin) or a known agent-mailbox domain. Real and deliverable, but you can’t see who is behind it.Accept, or ask for one more step.
holdOne fake signal, a placeholder like test123@, or a role inbox.Confirm by email before activating. Real people land here.
dropBad syntax, no mail server, a disposable domain, your blocklist, or two fake signals that agree.Reject it.

hold is not a soft reject. A hard deny only comes from a rule you wrote yourself. The score ladder (0–5 is a gate fact, 80 and up means the AI says it looks real) is written out in email risk score.

What happens when a check fails or times out?

The API fails open. If every mailbox check errors or times out, /v1/verify still returns 200 with degraded: true, verdict: "unknown" and calibration: "prior". The number in that response is a base rate for the mail host, not a measurement of the address, and it says so. With no mailbox provider connected today, there is nothing to time out, so you will rarely see degraded yet. Write the branch anyway.

A verification API that throws a 500 breaks the signup form it was added to protect. So the branch that matters in production is not your catch, it is if (v.degraded): let the person in, flag it, decide later. If the AI check is unavailable, the request goes on without it and ai.status tells you.

  • 429 rate_limited: back off with jitter. The limit is 600 requests a minute per key.
  • 402 quota_exceeded: do not retry. The month’s allowance is spent.
  • A 5xx: retry once, then let the signup through.

The details are in going to production.

How long are email validation results cached?

An answer is cached for 7 days, or 30 days where the evidence is stable. Every response carries cache: { hit, ttl_s }, and ttl_s is the real time left on that entry.

Some answers are never cached, on purpose:

  • A degraded answer. Caching “nobody answered” for a week would be a bug.
  • A gate answer like the drop above. It costs nothing to work out again, and a domain that fixes its MX record should not keep its old answer for a week.
  • An answer your own allowlist shaped, or one where MX did not resolve.

The cache key is a peppered hash of the address, not the address. Your account’s rules are applied again on every request, including a cache hit, so one customer’s blocklist never shows up in another’s answer. A cache hit still counts as a verification against your quota.

Can I see why an address got its answer?

Yes. Every response has a trace_id (vr_…), and GET /v1/traces/:trace_id returns the receipt: which checks ran, what each said, how long each took, and whether the number came from a prior or from your own data.

Store the trace_id next to the user you created. When support asks why someone was held, you look it up instead of guessing. When the address bounces later, post it to /v1/outcome with that id. That is also how you earn the lower rate. Traces are scoped to your organisation; another account’s id is a 404, not a 403.

Do I need /v1/verify, or is /v1/check enough?

Use the free /v1/check while someone is typing and /v1/verify when they press submit.

Question/v1/check/v1/verify
Syntax, MX, disposable, your rulesYesYes
Role, relay and agent-mailbox detectionNoYes
AI check on the addressNoYes
recommendation, score, verdictNoYes
Runs your active policyNoYes
CostFree, no quotaCounts against monthly quota

The free one has its own page: disposable email detection API.

How much does it cost?

$4.00 per 1,000 sends protected, or $3.40 if you report outcomes. Per-check pricing pays a vendor to check more, which is the opposite of what you want. Signing in gives you a key and 10,000 verifications a month, no card. The volume ladder is on pricing.

Questions people ask

What is an email validation API?

It is an HTTP endpoint you call with an email address before you accept it, usually in a signup handler. Sortance's is POST /v1/verify. It checks syntax, mail servers, disposable domains, the type of mailbox and your own rules, asks an AI model whether the address looks real, and returns one recommendation: send, challenge, hold or drop.

Does the Sortance API check that the mailbox exists?

Not today. Adapters for mailbox providers are built, but none is connected in production, so mailbox_checked is false on every response. A plausible address that does not exist will usually read send. What the API does catch is throwaway domains, domains with no mail server, bad syntax and addresses the AI model flags as made up.

What happens if the email verification API is slow or down?

A provider failure does not become an error for you. If a mailbox check errors or times out, /v1/verify still returns 200 with degraded: true, verdict unknown and a prior instead of a measurement. Let that signup through and look at it later. A 5xx should be rare; retry once, then let traffic through.

Should I branch on verdict, score or recommendation?

Branch on recommendation, or on decision.action when your organisation has an active policy. verdict is a label for humans. With no mailbox lookup, which today is most of the time, it reads likely_valid when Sortance vouches for the address and unknown when it cannot. score is useful for a stricter rule of your own, for example sending anything under 70 to review.

How much does the email validation API cost?

Signing in gives you an API key and 10,000 verifications a month without a card. The list price is $4.00 per 1,000 sends protected, or $3.40 when you report outcomes to /v1/outcome. The domain-only pre-filter, POST /v1/check, is free and does not use quota.