Email Validator: Validation
Validate Emails
Validate up to 50 addresses in one command. They are checked in parallel and come back in the order you sent them.
https://g.sendcorex.com/v1/tool/validatecommand: validate_emailsNeeds the tools:validate scope on your API key.
1 credit per distinct address. Repeated addresses are validated and charged once, and appear once in results.
If your credits do not cover the whole list, nothing is validated: you get INSUFFICIENT_CREDITS with how many you need and how many you have.
Arguments
emailsstring[]required1 to 50 addresses.
e.g.
["ana@acme.com", "jhon@gmial.com"]
Quick start
import axios from 'axios';
const response = await axios.post(
'https://g.sendcorex.com/v1/tool/validate',
{
commands: [
{
command: "validate_emails",
args: {
emails: [
"ana@acme.com",
"jhon@gmial.com"
]
}
}
]
},
{ headers: { Authorization: process.env.SENDCOREX_API_KEY } },
);
const [result] = response.data.results;
if (result.type !== 'SUCCESS') throw new Error(`${result.code}: ${result.message}`);
console.log(result.data);Response
{
"type": "SUCCESS",
"results": [
{
"command": "validate_emails",
"id": "0",
"type": "SUCCESS",
"took_ms": 18,
"data": {
"results": [
{
"email": "ana@acme.com",
"valid": true,
"checks": [
{
"check": "Format Validation",
"status": "Passed",
"details": "Valid email format"
},
{
"check": "Local Part Validation",
"status": "Passed",
"details": "Local part is RFC compliant"
},
{
"check": "Role-based Email Check",
"status": "Passed",
"details": "Not a role-based address"
},
{
"check": "No-reply Email Check",
"status": "Passed",
"details": "Not a no-reply address"
},
{
"check": "Temporary Email Check",
"status": "Passed",
"details": "Not a temporary email"
},
{
"check": "Misspelled Domain Check",
"status": "Passed",
"details": "Correct"
},
{
"check": "Spam Trap Check",
"status": "Passed",
"details": "Not a spam trap"
},
{
"check": "Provider Type",
"status": "Passed",
"details": "Corporate or custom domain"
},
{
"check": "Domain Validation",
"status": "Passed",
"details": "Domain is valid and has MX records"
},
{
"check": "Null MX Check",
"status": "Passed",
"details": "Domain accepts email"
},
{
"check": "Email Provider Detection",
"status": "Passed",
"details": "Domain is hosted on a known provider: Google Workspace",
"providerId": 1,
"providerName": "Google Workspace"
},
{
"check": "Email Deliverability",
"status": "Passed",
"details": "Mailbox exists",
"fullResponse": "250 2.1.5 OK"
},
{
"check": "Catch-all Mail Exchanger Check",
"status": "Passed",
"details": "Mail exchanger correctly rejects nonexistent addresses"
}
]
},
{
"email": "jhon@gmial.com",
"valid": false,
"checks": [
{
"check": "Format Validation",
"status": "Passed",
"details": "Valid email format"
},
{
"check": "Local Part Validation",
"status": "Passed",
"details": "Local part is RFC compliant"
},
{
"check": "Role-based Email Check",
"status": "Passed",
"details": "Not a role-based address"
},
{
"check": "No-reply Email Check",
"status": "Passed",
"details": "Not a no-reply address"
},
{
"check": "Temporary Email Check",
"status": "Passed",
"details": "Not a temporary email"
},
{
"check": "Misspelled Domain Check",
"status": "Failed",
"details": "Possible typo. Suggested correction: jhon@gmail.com"
},
{
"check": "Spam Trap Check",
"status": "Passed",
"details": "Not a spam trap"
},
{
"check": "Provider Type",
"status": "Passed",
"details": "Corporate or custom domain"
},
{
"check": "Domain Validation",
"status": "Failed",
"details": "Invalid domain or no MX records"
}
]
}
],
"count": 2,
"valid_count": 1,
"invalid_count": 1,
"credits_used": 2
}
}
]
}Response fields
resultsOne result per distinct address, in the order you sent them.
count / valid_count / invalid_countHow many were checked, and how many came back valid and invalid.
credits_usedCredits taken by this command.
results[].emailThe address, trimmed and in lowercase.
results[].validtrueonly when every check passed.Provider TypeandEmail Provider Detectionare informative and never make itfalse.results[].checks[].checkThe name of the check. See Checks below.
results[].checks[].statusPassedorFailed.results[].checks[].detailsA sentence explaining the result, ready to show to a user.
results[].checks[].fullResponseOnly on
Email Deliverability: the exact answer of the mailbox server.results[].checks[].providerId / providerNameOnly on
Email Provider Detection: the mailbox provider that hosts the domain.
Big lists
For thousands of addresses, call this command in chunks of 50, one after the other, or upload the file in the dashboard (Email Validator → Lists): it is validated in the background and you get an email with the CSV when it is done.
Errors
HTTP-level errors return type, code and message. Errors marked CMD come back inside the command result, with HTTP 200.
- 401
INVALID_API_KEYThe API key does not exist, was revoked or was disabled in the dashboard.
- 429
RATE_LIMITEDMore than 75 requests/s or 75 in flight for the same IP + API key. Wait the number of seconds in Retry-After.
- CMD
MISSING_SCOPEThe API key does not have `tools:validate`.
- CMD
INVALID_ARGSAn argument is invalid: missing email (or domain, for `check_disposable`), more than 50 emails, an address longer than 254 characters, limit out of range…
- CMD
INSUFFICIENT_CREDITSYou do not have enough credits for the whole command (validation credits for `validate_*`, disposable credits for `check_disposable`). Nothing was checked and nothing was charged.
- CMD
CREDITS_UNAVAILABLEYour credits could not be read right now. Nothing was charged. Try again.
- CMD
NO_SERVERS_AVAILABLENo validation server is available right now. Nothing was charged. Try again shortly.
- CMD
VALIDATION_FAILEDThe validation servers did not answer in time. Your credits were returned. Try again.
- CMD
INTERNALServer error. The detail is only written to the server log.