Email Verification API

Learn how to verify email addresses using the API

The email verification endpoint allows you to check the validity, quality, and security of email addresses.

Endpoint

GET https://veille.io/api/v1/email/{email}

Replace {email} with the email address you want to verify.

Authentication

Include your API key in the request header or as a query parameter:

x-api-key: your-api-key-here

or

https://veille.io/api/v1/email/{email}?x_api_key=your-api-key-here

Response format

{
    "email": "user@example.com",
    "allowed": true,
    "reason": null,
    "disposable_provider": null,
    "is_alias": false,
    "is_role": false,
    "role_type": null,
    "is_education": false,
    "syntax_check": true,
    "has_valid_host": true,
    "has_valid_mx": true,
    "mx_records": [
        {
            "exchange": "mail.example.com",
            "priority": 10
        }
    ],
    "did_you_mean": null
}

Response Fields

FieldTypeDescriptionExample
emailstringThe normalized email address that was checkeduser@example.com
allowedbooleanWhether the email is allowed based on all validation checkstrue
reasonstringIf not allowed, provides the reason: 'invalid_format', 'disposable_domain', 'blocklisted', 'invalid_domain', 'no_mx_records'null
disposable_providerstringIf the email uses a disposable service, returns the provider name"tempmail"
is_aliasbooleanDetects if the email is an alias (e.g., user+tag@gmail.com, user.alias@gmail.com)false
is_rolebooleanIdentifies if the email is a role-based account (e.g., admin@, support@)false
role_typestringIf is_role is true, specifies the type of role account"support"
is_educationbooleanIndicates if the email domain is an educational institutionfalse
syntax_checkbooleanWhether the email follows proper syntax according to RFC standardstrue
has_valid_hostbooleanWhether the domain has valid DNS host recordstrue
has_valid_mxbooleanWhether the domain has valid MX (Mail Exchange) recordstrue
mx_recordsarrayList of MX records with exchange servers and priorities[{"exchange": "mail.example.com", "priority": 10}]
did_you_meanstringSuggests a correction for potential typos in common email domains"gmail.com"

Validation Checks

Here's how the email verification works:

Basic Format Check

  • Checks if the email follows standard format (user@domain.com)
  • Makes sure the email isn't too long (max 254 characters)
  • Verifies there are no invalid characters

Domain Health Check

  • Looks up the domain's DNS records
  • Checks if the domain has working mail servers (MX records)
  • Verifies the domain actually exists

Security Checks

  • Checks if the email is from a disposable email service
  • Looks for the email in your account's blocklist
  • Checks if the domain is in your account's blocklist

Quality Analysis

  • Detects if it's a role-based email (like admin@, support@)
  • Identifies email aliases (like user+tag@gmail.com)
  • Checks if it's from an educational institution
  • Suggests corrections for common typos (like gmial.com → gmail.com)

Code examples

cURL

curl -X GET \
  'https://veille.io/api/v1/email/user@example.com' \
  -H 'x-api-key: your-api-key-here'

JavaScript (Fetch)

fetch('https://veille.io/api/v1/email/user@example.com', {
  headers: {
    'x-api-key': 'your-api-key-here'
  }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

Python (Requests)

import requests

headers = {
    'x-api-key': 'your-api-key-here'
}

response = requests.get(
    'https://veille.io/api/v1/email/user@example.com',
    headers=headers
)

print(response.json())

PHP

<?php
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://veille.io/api/v1/email/user@example.com');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'x-api-key: your-api-key-here'
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>