MailValidation.io

API Documentation

Validate email addresses programmatically with our REST API, or embed our widget on your site.


Authentication

All API requests require authentication via your API key. Find your key in your dashboard under Team → API Keys.

Include the key in the Authorization header:

Authorization: Api-Key YOUR_API_KEY

Validate an Email

POST /api/validate/
Request Body
{
  "email": "user@example.com"
}
Response
{
  "id": 1234,
  "email": "user@example.com",
  "is_valid": true,
  "is_blacklist": false,
  "valid_format": true,
  "valid_domain": true,
  "valid_nameserver": true,
  "dns_timeout": false,
  "dns_config_error": false,
  "no_mx": false,
  "no_valid_mx": false,
  "disposable": false,
  "is_catch_all": false,
  "is_role_account": false,
  "is_free_email": false,
  "processing": false,
  "last_validated": "2026-03-11T12:00:00Z"
}
Response Fields
FieldTypeDescription
is_validbooleanWhether the mailbox exists and accepts email (SMTP RCPT TO check)
valid_formatbooleanWhether the email address syntax is valid (RFC 5322)
valid_domainbooleanWhether the domain exists in DNS
valid_nameserverbooleanWhether the domain has functioning nameservers
disposablebooleanWhether the email is from a known disposable/temporary provider
is_catch_allbooleanWhether the domain accepts all email addresses (catch-all)
is_role_accountbooleanWhether the address is a role account (info@, admin@, support@, etc.)
is_free_emailbooleanWhether the email is from a free provider (Gmail, Yahoo, Outlook, etc.)
is_blacklistbooleanWhether the domain appears on email blacklists
no_mxbooleanWhether the domain has no MX records
dns_timeoutbooleanWhether the DNS lookup timed out
processingbooleanWhether the validation is still in progress (async)
Example (cURL)
curl -X POST https://app.mailvalidation.io/api/validate/ \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email": "test@example.com"}'
Status Codes
201Success — email validated
400Invalid request body
401Missing or invalid API key
402Validation limit reached — upgrade your plan
429Rate limit exceeded (1,000 requests/hour per user)

Embeddable Widget

Add real-time email validation to any website form with a single line of JavaScript. No backend changes needed.

Quick Start

1. Create a widget in your dashboard under Widgets.
2. Copy the embed code and paste it before the closing </body> tag on your site.

<script src="https://app.mailvalidation.io/static/mv/widget.js"
        data-mv-key="YOUR_WIDGET_KEY"></script>

The widget automatically validates all <input type="email"> fields on the page.

Attributes
data-mv-keyRequired. Your widget API key (from the dashboard).
data-mv-validateAdd to any non-email input to opt it into validation.
data-mv-skipAdd to any email input to skip validation.
Widget API Endpoint
POST /api/widget/{widget_key}/validate/

This is the endpoint the widget JS calls. CORS-enabled, no authentication required — the widget key identifies your account.

// Request
POST /api/widget/a1b2c3d4-e5f6-7890-abcd-ef1234567890/validate/
Content-Type: application/json
{"email": "user@example.com"}

// Response
{
  "valid": true,
  "reason": "valid",
  "message": "Email is valid.",
  "branding": {
    "text": "Protected by MailValidation.io",
    "url": "https://mailvalidation.io"
  }
}
Widget Response Reasons
validEmail passed all checks
invalid_formatEmail syntax is invalid
invalid_smtpMailbox could not be verified
disposableDisposable email blocked
free_emailFree email provider blocked
role_accountRole account (info@, admin@) blocked
limitAccount validation limit reached

Rate Limits

Authenticated users1,000 requests / hour
Anonymous / unauthenticated100 requests / hour
Widget APINo separate rate limit (counts against your plan's monthly allowance)

Webhooks

Configure webhook endpoints to receive notifications when events occur.

Events
bulk_completeFired when a bulk validation upload finishes processing
widget_blockFired when a widget blocks an email submission
Payload Format
POST https://your-endpoint.com/webhook
Content-Type: application/json
X-MV-Signature: hmac_sha256_hex_digest  (if signing secret is set)

{
  "event": "bulk_complete",
  "data": {
    "bulk_upload_id": 42,
    "filename": "contacts.csv",
    "total": 500,
    "valid": 420,
    "invalid": 80,
    "health_score": 84.0
  }
}

Ready to get started?

Create Free Account

100 free validations · no credit card required