Overview
Use of the API is governed by our Terms of Service, Acceptable Use Policy and Data Processing Agreement.
All requests go to the base URL below over HTTPS. Requests and responses use JSON, and responses are UTF-8 encoded.
A machine-readable description of the API is at /openapi.json (OpenAPI 3.1). Import it into Postman or Insomnia, generate a client, or give it to an AI coding assistant. There's also a short summary for AI tools at /llms.txt.
Using an AI coding assistant? Paste this prompt and it will wire up the API for you:
Add email validation to the sign-up flow of this app using the validateemail.io API (reference: https://validateemail.io/llms.txt).
- Call POST https://validateemail.io/v1/validate from server-side code only, with the header "Authorization: Bearer <key>" read from the VALIDATEEMAIL_KEY environment variable, and the JSON body {"email": "<address>"}. Never call it from the browser.
- Reject the address with a clear message when "status" is "invalid" or "checks.disposable" is true.
- When "did_you_mean" is set, show "Did you mean <did_you_mean>?" and let the user accept the fix.
- Use a 5-second timeout. If the API fails, times out or returns "status": "unknown", accept the address so sign-ups never break.
- Add a test that mocks the API for a valid, an invalid and a disposable address.Authentication
Authenticate every request with your API key. The recommended method is the Authorization header:
Authorization: Bearer ev_your_api_keyThe API also accepts an X-API-Key: ev_your_api_key header. Keys in the URL are not accepted, because URLs end up in logs. Keep your key on your server. Anyone who has it can use your quota.
If a key may have leaked, rotate it. You get a new key with the same plan, allowance and usage, and the old key stops working at once:
curl -X POST "https://validateemail.io/v1/key/rotate" \
-H "Authorization: Bearer $VALIDATEEMAIL_KEY"Browser keys
Your secret key (ev_…) must stay on your server. If your site has no back end, for example a static site or a form builder, create a browser key (pk_…) instead. It's safe to put in front-end code because it only works from the web origins you list, only validates one address per request, and can't manage keys. It uses your account's lookups.
curl -X POST "https://validateemail.io/v1/keys/browser" \
-H "Authorization: Bearer $VALIDATEEMAIL_KEY" \
-H "Content-Type: application/json" \
-d '{"origins": ["https://www.example.com", "http://localhost:3000"]}'Origins must be HTTPS, except http://localhost for development. Then call /v1/validate from the page with Authorization: Bearer pk_…; requests from any other origin get 403 origin_not_allowed. Revoke a browser key with DELETE /v1/keys/browser/<id> and your secret key. Rotating your secret key keeps its browser keys working. An account can have up to 20 active browser keys (409 too_many_browser_keys past that), and key changes are limited to 10 a minute per IP.
Free tier and quota
Free keys include 250 lookups a day. The allowance is counted over 24 hours from your first lookup, then renews. Every address counts as one lookup, so a batch of 100 uses 100. Cached results count too. Each response from a key with a limit includes your allowance in three headers:
| Header | Meaning |
|---|---|
X-Quota-Limit | Lookups this key may use in 24 hours. |
X-Quota-Remaining | Lookups left in the current 24 hours, after this request. |
X-Quota-Reset | Unix time (seconds) when the current 24 hours end and the allowance renews. |
When a request needs more lookups than the key has left, the API returns 429 and doesn't use any. A batch that's too big for what's left can be split into smaller ones. Once the day's allowance is used up, wait for the time in Retry-After, or contact us about an Enterprise plan for a higher limit:
{
"error": {
"code": "daily_limit_reached",
"message": "This key has used its 250 lookups for the last 24 hours. More are available from 2026-11-26T09:14:02.000Z. For a higher limit, contact us: https://validateemail.io/upgrade",
"remaining": 0,
"reset_at": "2026-11-26T09:14:02.000Z",
"contact_url": "https://validateemail.io/upgrade"
}
}Validate an address
Validates a single address. POST a JSON body, or use GET with a query parameter for quick tests. Prefer POST in production: an address in the URL ends up in request logs and browser history.
Parameters
| Name | In | Description |
|---|---|---|
email | query / body | Required. The address to validate. |
fresh | query | Optional. true bypasses the cache and re-runs every check. The new result is cached again. |
Example
curl "https://validateemail.io/v1/validate?email=jane.doe@gmail.com" \
-H "Authorization: Bearer $VALIDATEEMAIL_KEY"
curl -X POST "https://validateemail.io/v1/validate" \
-H "Authorization: Bearer $VALIDATEEMAIL_KEY" \
-H "Content-Type: application/json" \
-d '{"email": "jane.doe@gmail.com"}'
const res = await fetch("https://validateemail.io/v1/validate", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.VALIDATEEMAIL_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ email: "jane.doe@gmail.com" }),
});
const result = await res.json();
Batch validation
Validates up to 100 addresses in one request. Results come back in the same order you sent them. Each distinct domain is looked up once per batch, so batches are much faster than the same number of single calls. To check a whole list without writing code, upload it on the bulk validation page.
curl -X POST "https://validateemail.io/v1/validate/batch" \
-H "Authorization: Bearer $VALIDATEEMAIL_KEY" \
-H "Content-Type: application/json" \
-d '{"emails": ["jane@gmail.com", "info@acme.io", "bob@gmial.com"]}'The response is an object with a results array. Each entry has the same shape as a single-address response:
{ "results": [ { "email": "jane@gmail.com", "status": "valid", … }, … ] }Use it from AI assistants (MCP)
validateemail.io is also an MCP server, so AI coding assistants and agents can check addresses themselves, for example while cleaning a list or testing a sign-up form. It has two tools: validate_email for one address and validate_emails for up to 100. Each address counts as one lookup on your key, exactly like the REST API.
Claude Code:
claude mcp add --transport http validateemail https://validateemail.io/mcp \
--header "Authorization: Bearer $VALIDATEEMAIL_KEY"Cursor (.cursor/mcp.json) and VS Code (.vscode/mcp.json, with "servers" instead of "mcpServers" and "type": "http"):
{
"mcpServers": {
"validateemail": {
"url": "https://validateemail.io/mcp",
"headers": { "Authorization": "Bearer ev_your_api_key" }
}
}
}The tools return the same JSON as the API. When the key is missing, invalid or out of lookups, the tool returns an error message the assistant can pass on to you. The server uses the Streamable HTTP transport and answers each request with plain JSON; it keeps no session.
Report delivery outcomes
Tell us what happened when you emailed addresses you validated. We match each report to the verdict the address was given and count outcomes per status and reason, so we can check and tune the scores. Reporting is free: it needs your API key but uses no lookups.
curl -X POST "https://validateemail.io/v1/feedback" \
-H "Authorization: Bearer $VALIDATEEMAIL_KEY" \
-H "Content-Type: application/json" \
-d '{"feedback": [{"email": "jane@acme.io", "outcome": "delivered"}, {"email": "bob@acme.io", "outcome": "hard_bounce"}]}'Send one report as {"email": "…", "outcome": "…"}, or up to 100 in a feedback array. The answer is 202 with {"accepted": 2}. The same report (address and outcome) counts once a day, and each key counts at most 10,000 reports a day; reports past either are answered with an ignored count and not added.
| Outcome | When to send it |
|---|---|
delivered | The message was accepted by the receiving server. |
hard_bounce | A permanent failure, such as no such user. Add fresh=true to your next check of it to skip the cache. |
soft_bounce | A temporary failure, such as a full mailbox. |
complaint | The recipient marked the message as spam. |
We don't store the addresses you report, only daily totals per verdict and outcome.
Response format
{
"email": "bob@gmial.com",
"normalized": "bob@gmial.com",
"user": "bob",
"domain": "gmial.com",
"status": "risky",
"reason": "possible_typo",
"score": 0.5,
"did_you_mean": "bob@gmail.com",
"checks": {
"syntax": true,
"domain_exists": true,
"mx_found": true,
"disposable": false,
"role_based": false,
"free_provider": false,
"parked": false,
"catch_all": null,
"smtp": null
},
"mx_records": [{ "exchange": "mx.gmial.com", "priority": 10 }],
"checked_at": "2026-10-21T14:37:17.479Z"
}| Field | Type | Description |
|---|---|---|
email | string | The address exactly as you sent it. |
normalized | string | null | Trimmed, lower-cased address with the domain in punycode. null if the syntax is invalid. |
user, domain | string | null | The local part and domain. |
status | string | valid, invalid, risky or unknown. See statuses. |
reason | string | Machine-readable reason for the status. |
score | number | Confidence from 0 (certainly bad) to 1 (very likely good). |
did_you_mean | string | null | Suggested correction for a likely typo: a misspelt provider (gmial.com → gmail.com), a mistyped ending (.con, gmail.co), or a malformed address (jane@gmail,com). Also returned with invalid results. Real regional domains such as yahoo.de are never "corrected". |
checks.syntax | boolean | The address is well-formed. |
checks.domain_exists | boolean | null | The domain exists in DNS. null if DNS could not be reached. |
checks.mx_found | boolean | null | The domain has a mail server: an MX record whose host resolves, or an A/AAAA fallback when there is no MX record. |
checks.disposable | boolean | null | The domain is a known disposable or temporary inbox provider, or its mail is handled by one of their mail servers. |
checks.parked | boolean | null | The domain is parked with a domain-parking network (listed for sale or showing ads), so nobody reads its mail. |
checks.catch_all | boolean | null | The domain's mail server accepts any address, so this mailbox can't be confirmed. null when it wasn't tested or the test couldn't tell. |
checks.role_based | boolean | null | The local part is a shared/role inbox such as info or support. |
checks.free_provider | boolean | null | The domain is a consumer mailbox provider such as Gmail or Outlook. |
checks.smtp | null | Reserved for mailbox-level verification. Not performed yet, so it is always null. |
mx_records | array | The domain's mail servers, sorted by priority. |
checked_at | string | ISO 8601 time of your request. |
Statuses & reasons
| Status | Reason | Meaning |
|---|---|---|
valid | mail_server_found | Well-formed, the domain accepts mail, and no risk signals were found. |
risky | disposable | A temporary/throwaway inbox provider. |
risky | parked_domain | The domain is parked: listed for sale or showing ads, so nobody reads its mail. |
risky | accept_all | The domain accepts mail for any address (catch-all), so this mailbox can't be confirmed to exist. |
risky | possible_typo | The domain closely resembles a popular provider. Check did_you_mean. |
risky | no_mx_records | No MX records. Mail would fall back to the domain's A/AAAA record, which is unusual for real mailboxes. |
risky | role_based | A shared inbox (info@, support@, …). |
invalid | domain_not_found | The domain does not exist. |
invalid | domain_rejects_mail | The domain publishes a "null MX" record, so it explicitly accepts no mail. |
invalid | no_mail_server | The domain has no mail server at all, or its MX records point to hosts that don’t exist. |
invalid | syntax reasons | e.g. missing_at_or_part, invalid_domain, invalid_local_part_characters, local_part_too_long, invalid_tld. |
unknown | dns_error | DNS could not be resolved right now. This is temporary, so retry later. |
When several risk signals apply, the most significant one is reported as the reason. Every signal is still visible in checks.
Errors
Errors use standard HTTP status codes and a consistent JSON body:
{ "error": { "code": "unauthorized", "message": "Invalid or revoked API key" } }| HTTP | Code | When |
|---|---|---|
| 400 | bad_request | Missing or malformed email / emails. |
| 400 | batch_too_large | More than 100 addresses in a batch. |
| 401 | unauthorized | No API key, or the key is invalid or revoked. |
| 403 | origin_not_allowed | A browser key used from an origin it doesn't allow, or with no Origin header. |
| 403 | browser_key | A browser key used for anything other than validating one address. |
| 405 | method_not_allowed | Wrong HTTP method for the endpoint. |
| 409 | too_many_browser_keys | The account already has 20 active browser keys. Revoke one first. |
| 429 | rate_limited | More than 120 requests a minute with one key. Wait for the Retry-After seconds, or send up to 100 addresses per batch request. |
| 429 | daily_limit_reached | The key has used its lookups for the current 24 hours. Retry-After says when they renew. See Free tier and quota. |
| 429 | quota_exceeded | The batch needs more lookups than the key has left today. Nothing was used; send a smaller batch. |
| 500 | internal_error | Something went wrong on our side. Any lookups the request used are given back. Safe to retry. |
200 OK with "status": "invalid".Caching
To keep responses fast, results are cached: per address for 7 days, and per domain (DNS and list checks) for 24 hours. Results that say a domain can’t receive mail (domain_not_found, domain_rejects_mail, no_mail_server) are kept for one hour only, so a newly registered or repaired domain is seen quickly. Responses don't say whether they came from the cache, since the cache is shared and that would tell you whether someone else checked the address. Temporary DNS failures are never cached. Add fresh=true to force a re-check.
Best practices
- Call from your backend. Your key should never ship in browser or mobile code.
- Block
invalid, reviewrisky. Decide per use case. A newsletter might accept role accounts, while a free trial might reject disposable inboxes. - Show
did_you_mean. Offering the fix inline recovers sign-ups that would otherwise bounce. - Treat
unknownas a soft pass. Accept the address and re-validate later rather than blocking a real user. - Use batch for lists. It's one round-trip, and shared domains are only looked up once.