Domain Verification API

Learn how to verify domains using the API

The domain verification endpoint allows you to check the validity, quality, and security of domains.

Endpoint

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

Replace {domain} with the domain 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/domain/{domain}?x_api_key=your-api-key-here

Response format

{
    "domain": "example.com",
    "allowed": true,
    "reason": null,
    "disposable_provider": null,
    "is_education": false,
    "has_valid_host": true,
    "has_valid_mx": true,
    "mx_records": [
        {
            "exchange": "mail.example.com",
            "priority": 10
        }
    ]
}

Response Fields

FieldTypeDescriptionExample
domainstringThe normalized domain that was checkedexample.com
allowedbooleanWhether the domain is allowed based on all validation checkstrue
reasonstringIf not allowed, provides the reason: 'disposable_domain', 'blocklisted', 'invalid_domain'null
disposable_providerstringIf the domain is a disposable service, returns the provider name"tempmail"
is_educationbooleanIndicates if the domain is an educational institutionfalse
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}]

Validation Checks

Here's how the domain verification works:

Basic Format Check

  • Makes sure the domain follows standard format (example.com)
  • Checks if it has a valid top-level domain (like .com, .org)
  • 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 it's a disposable email service domain
  • Looks for the domain in your account's blocklist
  • Verifies it's not a known malicious domain

Domain Type Analysis

  • Identifies if it's an educational institution
  • Checks for common domain patterns
  • Detects special-purpose domains

Code examples

cURL

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

JavaScript (Fetch)

fetch('https://veille.io/api/v1/domain/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/domain/example.com',
    headers=headers
)

print(response.json())

PHP

<?php
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://veille.io/api/v1/domain/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;
?>