Validate email
Validate email is an API that checks whether an email address has a correct format and, optionally, whether its domain has records set up to receive mail (MX), right before you save it to your database or send it something.
How it works
You send the email and it checks two things: the format (the same criteria browsers use for an email-type field) and, if the format is correct, whether the domain actually has MX records. It doesn't send any email or check that the specific account exists, only that the domain is set up to receive mail.
An invalid email isn't a request error: the response is 200 with "valid": false, same as when it's valid.
All you need
- Your API key. Create it in your dashboard with "+ Create key". It's shown only once, so copy and save it.
- In your automation platform, an "HTTP Request" step (n8n, Make, Zapier, Pipedream… all have one).
How to use it in n8n (step by step)
In the HTTP Request node:
- Method:
POST - URL:
https://api.cofferdock.com/validate-email - Send Headers: on → add two:
x-api-key= your key, andContent-Type=application/json - Send Body: on → Body Content Type: JSON →
{ "email": "customer@example.com" }
In Make (HTTP → Make a request module): same method and URL, Body type: Raw, Content type: JSON, with the same body.
Options (inside the JSON)
| Option | Default | What it does |
|---|---|---|
email | - | Required. The email to validate. |
check_mx | true | Set to false if you only want the format checked, without querying the domain (faster). |
API overview
- Endpoint:
POST https://api.cofferdock.com/validate-email - Auth: header
x-api-key: YOUR_KEY. - Input:
application/jsonONLY. - Format: the WHATWG living standard regex (the one behind
<input type="email">) plus an extra check that the part before@doesn't start/end with a dot or contain two dots in a row. - MX: Node's native
dns.resolveMxwith its own 5s timeout. Never returns a 500 for a DNS problem: if the lookup fails or times out,mx_foundcomes backnull(unknown) instead of forcing afalse, andvaliddoesn't drop just because of that. - Limits: 30 requests/min per IP. 1 call = 1 credit, whether the email is valid or not.
Options
| Option | Default | Description |
|---|---|---|
email | - | Required. Non-empty string, up to 254 characters. |
check_mx | true | Boolean. If false, the domain's DNS isn't queried. |
Possible reason values
| Value | Means |
|---|---|
invalid_format | The email's format isn't valid. |
no_mx_records | The domain has no MX records (or doesn't exist). |
null_mx | The domain explicitly publishes that it doesn't receive mail (RFC 7505). |
mx_lookup_timeout | The DNS lookup took longer than 5s. mx_found stays null. |
mx_lookup_failed | Network error while querying DNS. mx_found stays null. |
Examples
curl:
curl -X POST "https://api.cofferdock.com/validate-email" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"email":"customer@example.com"}'
JavaScript (Node 18+):
const r = await fetch('https://api.cofferdock.com/validate-email', {
method: 'POST',
headers: { 'x-api-key': 'YOUR_KEY', 'Content-Type': 'application/json' },
body: JSON.stringify({ email: 'customer@example.com' }),
});
const { valid, mx_found } = await r.json();
Python:
import requests
r = requests.post(
'https://api.cofferdock.com/validate-email',
headers={'x-api-key': 'YOUR_KEY', 'Content-Type': 'application/json'},
json={'email': 'customer@example.com'},
)
print(r.json())
Response
{ "success": true, "valid": true, "format_valid": true, "mx_found": true, "domain": "example.com",
"meta": { "used": 12, "remaining": 488 } }
What you get back
valid is the overall verdict; format_valid and mx_found tell you separately what failed if valid is false, and reason explains it in one word.