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
Field | Type | Description | Example |
---|---|---|---|
string | The normalized email address that was checked | user@example.com | |
allowed | boolean | Whether the email is allowed based on all validation checks | true |
reason | string | If not allowed, provides the reason: 'invalid_format', 'disposable_domain', 'blocklisted', 'invalid_domain', 'no_mx_records' | null |
disposable_provider | string | If the email uses a disposable service, returns the provider name | "tempmail" |
is_alias | boolean | Detects if the email is an alias (e.g., user+tag@gmail.com, user.alias@gmail.com) | false |
is_role | boolean | Identifies if the email is a role-based account (e.g., admin@, support@) | false |
role_type | string | If is_role is true, specifies the type of role account | "support" |
is_education | boolean | Indicates if the email domain is an educational institution | false |
syntax_check | boolean | Whether the email follows proper syntax according to RFC standards | true |
has_valid_host | boolean | Whether the domain has valid DNS host records | true |
has_valid_mx | boolean | Whether the domain has valid MX (Mail Exchange) records | true |
mx_records | array | List of MX records with exchange servers and priorities | [{"exchange": "mail.example.com", "priority": 10}] |
did_you_mean | string | Suggests 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; ?>