🚀 Experience the new and improved APIVoid! Check out what's new
A JSON API to verify if an email address is disposable, if it is spoofable, if it is well configured, if it is a free email, and much more. Use this API to reduce fake sign-ups, remove invalid emails, and get valuable email details.
Consumes 1 credit per API call
# Example Curl request from the command line:
curl -X POST "https://api.apivoid.com/v2/email-verify" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY_HERE" \
-d '{"email": "a1k5z0a3@yopmail.com"}'
# Example JSON output for a 200 HTTP status code:
{
"email": "a1k5z0a3@yopmail.com",
"valid_format": true,
"username": "a1k5z0a3",
"role_address": false,
"suspicious_username": false,
"dirty_words_username": false,
"suspicious_email": false,
"domain": "yopmail.com",
"valid_tld": true,
"disposable": true,
"email_forwarder": false,
"has_a_records": true,
"has_mx_records": true,
"has_spf_records": true,
"is_spoofable": false,
"dmarc_configured": true,
"dmarc_enforced": true,
"free_email": false,
"russian_free_email": false,
"china_free_email": false,
"did_you_mean": "",
"suspicious_domain": false,
"dirty_words_domain": false,
"domain_popular": true,
"risky_tld": false,
"police_domain": false,
"government_domain": false,
"educational_domain": false,
"should_block": true,
"score": 0,
"elapsed_ms": "20"
}
Checking reputation...
Checking reputation...
Checking reputation...
Checking reputation...
Checking reputation...
Checking reputation...
Checking reputation...
Key Features
Businesses and startups use this Email Verify API to check if an email address is suspicious, temporary/disposable or known malicious, if it is correctly configured, and if it should be blocked.
This API can effectively detect known and not-yet-known disposable email domains (also known as DED).
We check if the email domain has valid MX records, if it has DMARC and SPF records, and many more things.
The API returns information about the email username, such as if it contains dirty or suspicious words.
Among with all email details, the API provides also a trust score and a "should block" JSON field.
Common Use Cases
Our API can be used in many ways, from cybersecurity tasks to email marketing-specific tasks. Here we showcase the most popular use cases according to our customers usage:
Using a SIEM platform? Add context to security incidents related to email addresses of user registrations.
With this API you can clean email lists by removing fake, invalid and disposable email addresses.
Whether you need to verify customer emails, get email reputation or email domain details, our API has it all.
If you have a registration form you can block suspicious user sign-ups based on their email reputation.
USAGE EXAMPLE
All it takes is a HTTPS POST request with JSON payload to our endpoint, and you’ll receive the response within seconds, usually within 1-3 seconds. Here are a few code examples to use the API:
$email = 'a9k4h3r@yopmail.com';
$apiUrl = 'https://api.apivoid.com/v2/email-verify';
$apiKey = 'your_api_key_here';
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'X-API-Key: ' . $apiKey]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['email' => $email]));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode === 200) {
$responseData = json_decode($response, true);
print_r($responseData);
// Check if the email should be blocked
// Is true when email is detected as invalid, suspicious, disposable, malicious
if ($responseData['should_block'] ?? false) {
echo "The email is invalid or suspicious and is blocked.";
exit;
}
// Check if the email has a valid format
if (!($responseData['valid_format'] ?? false)) {
echo "The email format is not valid.";
exit;
}
// Check if the email domain is disposable or suspicious
if ($responseData['disposable'] ?? false || $responseData['suspicious_domain'] ?? false) {
echo "Disposable and temporary emails are not allowed.";
exit;
}
// Check if the email contains "dirty" words
if ($responseData['dirty_words_username'] ?? false || $responseData['dirty_words_domain'] ?? false) {
echo "The email contains dirty and not-allowed words.";
exit;
}
// Check if the email username is suspicious
if ($responseData['suspicious_username'] ?? false) {
echo "The email username is suspicious.";
exit;
}
// Check if the email TLD (i.e .com) is correct
if (!($responseData['valid_tld'] ?? false)) {
echo "The email domain TLD is not valid.";
exit;
}
// Check if the email domain has MX records configured
if (!($responseData['has_mx_records'] ?? false)) {
echo "The email domain has no MX records.";
exit;
}
// Check if the email TLD (i.e .top) is suspicious
if ($responseData['risky_tld'] ?? false) {
echo "The email domain TLD is suspicious.";
exit;
}
}
Create your account, pick a subscription plan, and make your first API call instantly with your API key—simple as that!
Get started now