API

Validate an email

POST /v1/validate checks one email address and returns its status, the reason for it and a recommended action. It costs 1 credit, except when the result is unknown or the answer needs no mail-server check (malformed and test addresses, and addresses on reserved domains), which are free.

Every field and every error at a glance, with the request in seven languages beside the responses: the reference pages for POST /v1/validate and GET /v1/validate.

Request

POST https://api.email-validation.org/v1/validate
Authorization: Bearer ev_live_…
Content-Type: application/json

{"email": "someone@example.com", "timeout": 10}
FieldRequiredDescription
emailyesThe address to check (up to 1,024 characters).
ip_addressnoIPv4 or IPv6 address the person used when they gave you the address, for example at sign-up. Ignored when it is not a valid IP.
timeoutnoSeconds you are willing to wait, 5 to 15 (default 10).
freshnotrue to check the address again even when it was checked in the last 12 months (default false). See repeat checks.

GET /v1/validate?email=… works too, with the same fields as query parameters. Prefer POST: it keeps addresses out of URLs, where proxies and logs may record them. Never put the API key in the URL.

For EU data residency, send the request to https://api-eu.email-validation.org/v1/validate. There it takes POST only: a GET gets 400 invalid_request (EU data residency).

Needs a key with the validate scope.

Response

{
  "email": "catch_all@sandbox.email-validation.org",
  "status": "catch_all",
  "reason": "catch_all",
  "action": "send_with_caution",
  "account": "catch_all",
  "domain": "sandbox.email-validation.org",
  "did_you_mean": null,
  "free_email": false,
  "role_account": false,
  "disposable": false,
  "catch_all_domain": true,
  "mx_found": true,
  "mx_record": "mx.sandbox.email-validation.org",
  "smtp_provider": "other",
  "domain_age_days": 3650,
  "processed_at": "2026-10-20T09:30:00.000Z",
  "credits_used": 0,
  "request_id": "req_7Hq2LmX9cV4bN8tR1zK6wD"
}
FieldTypeDescription
emailstringThe address as you sent it, without surrounding spaces (test addresses in lower case). For reason normalized, the corrected address; for an international domain, its ASCII form (xn--…), which is what we check.
statusStatusThe verdict for the address.
reasonReasonWhy the address got its status.
actionActionWhat we recommend doing with the address.
accountstring or nullThe part before the @ of email, as written there.
domainstring or nullThe part after the @ (international domains in ASCII form).
did_you_meanstring or nullA suggested correction when the address looks like a typo of a common domain.
free_emailboolean or nullTrue when the domain is a free consumer mailbox service.
role_accountboolean or nullTrue when the address belongs to a team or function (such as info@ or sales@) rather than a person: from the check or our own list of such names. Can be true on any status and never changes it.
disposableboolean or nullTrue when the address comes from a throwaway inbox service: from the check or our own list of such domains. A known throwaway address returns the status disposable, unless the check found it invalid (for example a misspelled domain that the list names) or could not finish (unknown): those keep their status and still carry true.
catch_all_domainboolean or nullTrue when the domain accepts mail for any address. False when the mail server rejected this mailbox or the domain takes no mail.
mx_foundboolean or nullTrue when the domain publishes mail (MX) records; null when they were not looked up (for example on a likely_typo result).
mx_recordstring or nullThe preferred mail server host for the domain.
smtp_providerSmtpProvider or nullThe mail provider that hosts the domain's mailboxes.
domain_age_daysinteger or nullAge of the domain registration in days, when known.
processed_atstring (date-time)When this result was produced (UTC). A result reused from a check of the same address can come from a check made up to 12 months earlier; send fresh=true for a new check.
credits_usedinteger: 0, 11 when this result cost a credit. Results with status unknown, answers to malformed addresses and sandbox addresses are free. It is provisional until your usage shows it; rarely, it turns out free.
request_idstringOur ID for this request. Keep it in your logs, and quote it in a billing or legal dispute sent to legal@email-validation.org, which a person reads; the AI support assistant cannot look requests up.

Fields always come in this order. A field is null when it does not apply or is not known; for example did_you_mean is set only for likely typos, and mx_record is null for domains without mail records. An address with an international domain is checked in its ASCII form (xn--…), which email and domain show; a malformed address is answered invalid_syntax without a check, for free, and its flags are null. An address on a domain reserved for examples and testing, such as example.com or any .test domain, is answered invalid / no_dns without a check, for free (reserved domains).

email is the address as you sent it, without surrounding spaces (for reason normalized, the corrected address; for an international domain, its ASCII form), and account is the part before its @, as written there: it is never rewritten to a mailbox provider's own form (for example without dots).

The flags describe the address. role_account and disposable come from the check and from our own lists of team and function names (info@, support@, …) and of throwaway inbox domains; otherwise they are false. role_account never changes the status and can be true on any status, invalid included. A known throwaway address returns the status disposable with disposable: true, unless the check found it invalid (for example a likely typo whose misspelled domain is on that list) or could not finish (unknown): those keep their status and still carry disposable: true. Check the flag as well as the status, as the sign-up recipe does. catch_all_domain is true when the reason implies it, false when the mail server rejected the mailbox or the domain takes no mail, and otherwise what the check found about the domain (true, false, or null when it found nothing). mx_found is null when the mail records were not looked up, as on a likely_typo result. An unknown result can still carry fields the check learned before it stopped, such as mx_found or free_email; rely on status and reason, not on those fields.

Response headers:

HeaderMeaning
X-Request-IdOur ID for the request, the same as request_id.
X-Credits-RemainingYour balance after this request, when it is known at that moment. With requests spread over many connections it can lag a few seconds.
X-RateLimit-LimitRequests per second allowed for this key or account, when it is known at that moment.
X-Processed-InEU server only (https://api-eu.email-validation.org): the Cloudflare data center that processed the request (its code, for example FRA). See EU data residency.

Statuses, reasons and actions

StatusWhat it meansActionCredit
validThe mailbox exists and accepted our check, so mail sent to it should arrive.Depends on the reason: send (send) for accepted, alias, normalized, high_engagement, trusted_catch_all; send_with_caution (send with caution) for low_engagement, ai_agent, role_account; remove (remove) for abuse_linked, suppressed, trap_pattern, spamtrap, complainer. Read action.1
invalidMail sent to this address will not arrive, so it should come off your list.remove (remove)1
catch_allThe domain accepts mail for every address, so we cannot confirm that this particular mailbox exists.send_with_caution (send with caution)1
unknownWe could not get a definite answer this time, so no credit is used and a later retry often succeeds.retry_later (retry later)Free
disposableThe address comes from a throwaway mail service whose inboxes are soon abandoned, so remove it.remove (remove)1

Each status has its own page with every reason explained: statuses and reasons.

Timeouts

Some mail servers answer slowly. We wait at most timeout seconds (default 10). When a check cannot finish in time, you get status: unknown with reason: timeout, and no credit is used. Set your HTTP client's timeout a little higher than timeout, for example 20 seconds.

In sign-up forms, a shorter timeout such as 5 or 6 seconds keeps the form fast; see the sign-up form guide.

A slow server or an old result?

You gotSend it again withWhat happens
unknown with the reason timeouta higher timeout, up to 15The mail server gets more time to answer. unknown results are never reused, so the address is checked again, and an unknown answer is free.
A result you want checked anew, for example one with an old processed_atfresh=trueThe address is checked again instead of answered from a stored result (repeat checks). It costs 1 credit like any check.

Repeat checks

When an address was checked in the last 12 months, by you or anyone else, you may get the result of that check instead of a new one. It comes back at once and costs 1 credit, like a new check. processed_at is when this answer was produced, so a reused result can come from a check made up to 12 months earlier; domain_age_days is brought up to date. When you need a new check, send fresh=true. We do not say whether an answer was reused, or when or by whom the address was checked before: that would tell you about someone else's checks.

Results with status unknown are never reused: those addresses are always checked again. That check may not reach the mail server: for up to 10 minutes after a domain's mail servers failed to answer several times in a row, checks at that domain answer unknown (free) without asking them, and fresh=true does not lift that hold. Every other completed result can be reused, catch-all and mailbox_full results included. Answers to malformed and test addresses and to addresses on reserved domains, and normalized answers (the address was corrected), are never stored.

To check the address again anyway, send fresh=true: in the query string with GET, or with POST as a form field or JSON "fresh": true. You get the new result; it is stored only when the address has no stored result yet, and it never replaces or removes a stored one, so send fresh=true each time you need a new check. A fresh check costs 1 credit like any check, and a fresh check that comes back unknown is free.

We do not keep the address for this: results are stored under a keyed hash of the address and deleted after 12 months. See the privacy policy.

Errors

HTTPCodesMeaning
400invalid_requestMissing or invalid field, an Authorization header that is not Bearer <key>, two different keys in Authorization and X-Api-Key, or a key in the URL.
401unauthorizedNo key, or a key that is not valid (unknown, revoked, expired or rolled).
402insufficient_creditsNot enough credits.
403forbidden, forbidden_originScope, account state or browser origin.
413payload_too_largeThe request body is over 4 KB.
429rate_limited, abuse_throttled, key_daily_capSlow down; see Retry-After.
500internal_errorSomething failed on our side; retry later.
503service_unavailableTemporarily unavailable; retry after Retry-After.

No credit is used for a request that ends in an error. Details: Errors.

Examples

curl

# No --retry: curl would also resend after a timeout or a 500, 502 or 504, when the check may already have run and
# been charged. This loop resends only 429 and 503 (never charged), at most 3 attempts in all.
out=$(mktemp); hdr=$(mktemp)
for attempt in 1 2 3; do
  : > "$out"; : > "$hdr"
  code=$(curl -sS -o "$out" -D "$hdr" -w '%{http_code}' --max-time 20 \
    https://api.email-validation.org/v1/validate \
    -H "Authorization: Bearer $EV_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"email": "accepted@sandbox.email-validation.org"}')
  rc=$?
  # curl failed (timeout, dropped connection): not resent, the check may already be charged
  if [ "$rc" -ne 0 ]; then echo "curl failed with exit code $rc" >&2; code=000; break; fi
  wait_s=$(awk 'tolower($1) == "retry-after:" { print $2 + 0 }' "$hdr")
  wait_s=${wait_s:-1}
  # only our JSON error (it has a request_id) is resent; never key_daily_cap (it lasts until the next UTC day)
  if { [ "$code" = 429 ] || [ "$code" = 503 ]; } && grep -q '"request_id"' "$out" && ! grep -q '"key_daily_cap"' "$out" \
    && [ "$wait_s" -le 10 ] && [ "$attempt" -lt 3 ]; then
    sleep "$wait_s"
    continue
  fi
  cat "$out"; echo   # the result, or the error with its code and request_id
  break
done
rm -f "$out" "$hdr"
[ "$code" = 200 ]   # the exit status: 0 only for a result

PowerShell

# Windows PowerShell 5.1 and PowerShell 7 (in 5.1, curl is a short name for another command).
# Resends only 429 and 503 (never charged), at most 3 attempts; never a timeout or another error.
# Windows PowerShell 5.1 may offer only TLS 1.0, which the API refuses: allow TLS 1.2 (no effect in PowerShell 7).
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
$headers = @{ Authorization = "Bearer $env:EV_API_KEY" }
$request = @{
  Method = 'Post'; Uri = 'https://api.email-validation.org/v1/validate'; Headers = $headers; TimeoutSec = 20
  ContentType = 'application/json; charset=utf-8'; Body = (@{ email = 'accepted@sandbox.email-validation.org' } | ConvertTo-Json)
}
for ($attempt = 1; ; $attempt++) {
  try {
    $result = Invoke-RestMethod @request
    "$($result.status) $($result.reason) $($result.action) $($result.credits_used)"
    break
  } catch {
    $res = $_.Exception.Response
    if ($null -eq $res) { throw }   # a timeout or no answer: the check may already be charged
    # an empty or non-JSON body (a proxy's HTML page) leaves $err empty
    $err = if ($_.ErrorDetails.Message) { try { ($_.ErrorDetails.Message | ConvertFrom-Json).error } catch { $null } }
    $wait = 1   # Retry-After: Windows PowerShell 5.1 gives the text, PowerShell 7 parses it
    if ($res.Headers -is [Net.WebHeaderCollection]) { if ($res.Headers['Retry-After']) { $wait = [int]$res.Headers['Retry-After'] } }
    elseif ($res.Headers.RetryAfter.Delta) { $wait = $res.Headers.RetryAfter.Delta.TotalSeconds }
    # only our JSON error (it has a request_id) is resent; never wait out a long Retry-After: key_daily_cap lasts
    # until the next UTC day
    $code = [int]$res.StatusCode
    if (($code -eq 429 -or $code -eq 503) -and $err.request_id -and $err.code -ne 'key_daily_cap' -and $wait -le 10 -and $attempt -lt 3) {
      Start-Sleep -Seconds $wait
      continue
    }
    if ($err.code) { throw "$($err.code): $($err.message) ($($err.request_id))" } else { throw "HTTP $code" }
  }
}

JavaScript

const API = 'https://api.email-validation.org/v1/validate';
const MAX_WAIT_S = 10; // never wait out a long Retry-After (key_daily_cap lasts until the next UTC day)

async function validate(email, attempts = 3) {
  for (let attempt = 1; ; attempt++) {
    const res = await fetch(API, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.EV_API_KEY}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({ email }),
      signal: AbortSignal.timeout(20_000),
    });
    if (res.ok) return res.json();
    const error = (await res.json().catch(() => null))?.error;
    // not our JSON error (a proxy's HTML page, say): report the status, never resend it
    if (!error) throw new Error(`HTTP ${res.status} (request ${res.headers.get('X-Request-Id') ?? 'none'})`);
    const wait = Number(res.headers.get('Retry-After')) || 1;
    const retryable =
      (res.status === 429 || res.status === 503) && error.code !== 'key_daily_cap' && wait <= MAX_WAIT_S;
    if (retryable && attempt < attempts) {
      await new Promise((resolve) => setTimeout(resolve, wait * 1000));
      continue;
    }
    throw new Error(`${error.code}: ${error.message} (${error.request_id})`);
  }
}

const result = await validate('accepted@sandbox.email-validation.org');
console.log(result.status, result.reason, result.action, result.credits_used);

Python

import os
import time

import requests  # pip install requests

API = "https://api.email-validation.org/v1/validate"
MAX_WAIT_S = 10  # never wait out a long Retry-After (key_daily_cap lasts until the next UTC day)


def validate(email: str, attempts: int = 3) -> dict:
    for attempt in range(1, attempts + 1):
        resp = requests.post(
            API,
            headers={"Authorization": f"Bearer {os.environ['EV_API_KEY']}"},
            json={"email": email},
            timeout=20,
        )
        if resp.ok:
            return resp.json()
        try:
            error = resp.json()["error"]
        except (ValueError, KeyError, TypeError):
            # not our JSON error (a proxy's HTML page, say): report the status, never resend it
            rid = resp.headers.get("X-Request-Id", "none")
            raise RuntimeError(f"HTTP {resp.status_code} (request {rid})") from None
        wait = int(resp.headers.get("Retry-After", "1"))
        retryable = resp.status_code in (429, 503) and error["code"] != "key_daily_cap" and wait <= MAX_WAIT_S
        if retryable and attempt < attempts:
            time.sleep(wait)
            continue
        raise RuntimeError(f"{error['code']}: {error['message']} ({error['request_id']})")
    raise RuntimeError("no attempts left")


result = validate("accepted@sandbox.email-validation.org")
print(result["status"], result["reason"], result["action"], result["credits_used"])

PHP

<?php
function validate_email(string $email, int $attempts = 3): array
{
    for ($attempt = 1; ; $attempt++) {
        $headers = [];
        $ch = curl_init('https://api.email-validation.org/v1/validate');
        curl_setopt_array($ch, [
            CURLOPT_POST => true,
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_TIMEOUT => 20,
            CURLOPT_HTTPHEADER => [
                'Authorization: Bearer ' . getenv('EV_API_KEY'),
                'Content-Type: application/json',
            ],
            CURLOPT_POSTFIELDS => json_encode(['email' => $email]),
            CURLOPT_HEADERFUNCTION => function ($ch, $line) use (&$headers) {
                $parts = explode(':', $line, 2);
                if (count($parts) === 2) {
                    $headers[strtolower(trim($parts[0]))] = trim($parts[1]);
                }
                return strlen($line);
            },
        ]);
        $raw = curl_exec($ch);
        if ($raw === false) {
            throw new RuntimeException(curl_error($ch));
        }
        $status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
        $body = json_decode($raw, true);
        if ($status === 200) {
            return $body;
        }
        $error = $body['error'] ?? null;
        if (!is_array($error)) {
            // not our JSON error (a proxy's HTML page, say): report the status, never resend it
            throw new RuntimeException("HTTP $status (request " . ($headers['x-request-id'] ?? 'none') . ')');
        }
        // Never wait out a long Retry-After: key_daily_cap lasts until the next UTC day.
        $wait = max(1, (int) ($headers['retry-after'] ?? 1));
        $code = $error['code'] ?? '';
        if (in_array($status, [429, 503], true) && $code !== 'key_daily_cap' && $wait <= 10 && $attempt < $attempts) {
            sleep($wait);
            continue;
        }
        throw new RuntimeException("{$error['code']}: {$error['message']} ({$error['request_id']})");
    }
}

$result = validate_email('accepted@sandbox.email-validation.org');
echo "{$result['status']} {$result['reason']} {$result['action']}\n";

Go

package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"log"
	"net/http"
	"os"
	"strconv"
	"time"
)

type Result struct {
	Email       string `json:"email"`
	Status      string `json:"status"`
	Reason      string `json:"reason"`
	Action      string `json:"action"`
	CreditsUsed int    `json:"credits_used"`
	RequestID   string `json:"request_id"`
}

type apiError struct {
	Error struct {
		Code      string `json:"code"`
		Message   string `json:"message"`
		RequestID string `json:"request_id"`
	} `json:"error"`
}

var client = &http.Client{Timeout: 20 * time.Second}

// maxWait: never wait out a long Retry-After (key_daily_cap lasts until the next UTC day).
const maxWait = 10

func validate(email string, attempts int) (*Result, error) {
	payload, _ := json.Marshal(map[string]string{"email": email}) // a map of strings always encodes
	for attempt := 1; ; attempt++ {
		req, err := http.NewRequest(http.MethodPost, "https://api.email-validation.org/v1/validate", bytes.NewReader(payload))
		if err != nil {
			return nil, err
		}
		req.Header.Set("Authorization", "Bearer "+os.Getenv("EV_API_KEY"))
		req.Header.Set("Content-Type", "application/json")
		res, err := client.Do(req)
		if err != nil {
			return nil, err
		}
		if res.StatusCode == http.StatusOK {
			defer res.Body.Close()
			var result Result
			if err := json.NewDecoder(res.Body).Decode(&result); err != nil {
				return nil, err
			}
			return &result, nil
		}
		var e apiError
		_ = json.NewDecoder(res.Body).Decode(&e)
		res.Body.Close()
		if e.Error.Code == "" {
			// not our JSON error (a proxy's HTML page, say): report the status, never resend it
			return nil, fmt.Errorf("HTTP %d (request %q)", res.StatusCode, res.Header.Get("X-Request-Id"))
		}
		wait, err := strconv.Atoi(res.Header.Get("Retry-After"))
		if err != nil || wait < 1 {
			wait = 1
		}
		retryable := (res.StatusCode == http.StatusTooManyRequests || res.StatusCode == http.StatusServiceUnavailable) &&
			e.Error.Code != "key_daily_cap" && wait <= maxWait
		if retryable && attempt < attempts {
			time.Sleep(time.Duration(wait) * time.Second)
			continue
		}
		return nil, fmt.Errorf("%s: %s (%s)", e.Error.Code, e.Error.Message, e.Error.RequestID)
	}
}

func main() {
	result, err := validate("accepted@sandbox.email-validation.org", 3)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(result.Status, result.Reason, result.Action, result.CreditsUsed)
}

More languages, including TypeScript, Ruby, Java, C# and Rust: code samples.

Updated · Maintained by: Email Validation LLC

Need help? Contact support, or ask the help chat. Something wrong or missing on this page? Tell us