Skip to main content
POST
/
v1
/
people
/
email-validation
Email Validation
curl --request POST \
  --url https://api.leadmagic.io/v1/people/email-validation \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "email": "jesse@leadmagic.io"
}
'
{
  "email": "jesse@leadmagic.io",
  "email_status": "valid",
  "is_domain_catch_all": false,
  "credits_consumed": 0.25,
  "message": "Email is valid.",
  "mx_record": "aspmx.l.google.com",
  "mx_provider": "Google Workspace",
  "mx_gateway": null,
  "mx_gateway_type": null,
  "mx_security_gateway": false,
  "company_name": "Leadmagic",
  "company_industry": "Internet",
  "company_size": "11-50",
  "company_founded": 2022,
  "company_type": "Private",
  "company_location": {
    "name": "Boston, Massachusetts, United States",
    "locality": "Boston",
    "region": "Massachusetts",
    "metro": "Boston",
    "country": "United States",
    "continent": "North America",
    "street_address": "1 Seaport Lane",
    "address_line_2": null,
    "postal_code": "02210",
    "geo": null
  },
  "company_linkedin_url": "linkedin.com/company/leadmagichq",
  "company_linkedin_id": "75153174",
  "company_facebook_url": null,
  "company_twitter_url": null
}

Validate Email

Verify email addresses with industry-leading accuracy. Our validation system combines SMTP verification with engagement data for the most reliable results.

Endpoint Details

MetricValue
Cost0.25 credits per validation
Calculation4 validations = 1 credit
Free Resultsunknown and RFC-invalid results are free
You only pay for definitive SMTP results (valid, invalid). Inconclusive results (unknown) and RFC syntax failures are always free.
RFC 5321/5322 Compliance: Emails that fail RFC syntax validation are automatically marked invalid and returned instantly — no credits charged. This includes malformed addresses, invalid characters, and improper formatting.

Quick Example

curl -X POST 'https://api.leadmagic.io/v1/people/email-validation' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"email": "john@company.com"}'

Request Parameters

email
string
required
The email address to validate. Must be a properly formatted email address.

Response

email
string
required
The validated email address (normalized)
email_status
string
required
Validation result: valid, invalid, or unknown
is_domain_catch_all
boolean
required
Whether the email domain is a catch-all (accepts all addresses)
credits_consumed
number
required
Credits used for this request (0.25 for valid/invalid, 0 for unknown)
message
string
required
Human-readable status message
mx_record
string
Primary MX record for the domain
mx_provider
string
Email provider (Google Workspace, Microsoft 365, etc.)
mx_gateway
string
Security gateway vendor name (null if none)
mx_gateway_type
string
Security gateway type (null if none)
mx_security_gateway
boolean
Whether a security gateway is present

Example Response

{
  "email": "jesse@leadmagic.io",
  "email_status": "valid",
  "is_domain_catch_all": false,
  "credits_consumed": 0.25,
  "message": "Email is valid.",
  "mx_record": "aspmx.l.google.com",
  "mx_provider": "Google Workspace",
  "mx_gateway": null,
  "mx_gateway_type": null,
  "mx_security_gateway": false,
  "company_name": "Leadmagic",
  "company_industry": "Internet",
  "company_size": "11-50",
  "company_founded": 2022,
  "company_type": "Private",
  "company_location": {
    "name": "Boston, Massachusetts, United States",
    "locality": "Boston",
    "region": "Massachusetts",
    "metro": "Boston",
    "country": "United States",
    "continent": "North America",
    "street_address": "1 Seaport Lane",
    "address_line_2": null,
    "postal_code": "02210",
    "geo": null
  },
  "company_linkedin_url": "linkedin.com/company/leadmagichq",
  "company_linkedin_id": "75153174",
  "company_facebook_url": null,
  "company_twitter_url": null
}

Status Codes

valid

Safe to email - Bounce rate <1%Email verified by mail server. Costs 0.25 credits.

invalid

Do NOT email - Will bounceMail server confirmed non-existent. Costs 0.25 credits.

unknown

Inconclusive - Could not determine validityCouldn’t reach mail server or domain is unverifiable. FREE (no charge).

RFC Compliance

Emails that don’t comply with RFC 5321/5322 standards are automatically marked invalid — no credits charged:
RFC ViolationExampleResult
Missing @ symboljohncompany.cominvalid (FREE)
Invalid charactersjohn@comp any.cominvalid (FREE)
Missing domainjohn@invalid (FREE)
Double dotsjohn..doe@company.cominvalid (FREE)
Invalid TLDjohn@companyinvalid (FREE)
RFC validation happens instantly before SMTP verification. Malformed emails are rejected immediately at no cost — reserved credits are rolled back.

Success Messages

MessageStatusCost
Email is valid.valid0.25
Email is invalid.invalid0.25
Email is invalid (RFC non-compliant format).invalidFREE
Email is invalid (malformed address).invalidFREE
Unable to determine email validity.unknownFREE

Best Practices

Run basic regex validation before API calls to catch obvious RFC violations. While RFC failures are free, client-side checks reduce unnecessary API calls.
// Basic RFC-compliant check before API call
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (!emailRegex.test(email)) {
  // Skip API call - obviously invalid
  return { email_status: 'invalid', reason: 'malformed' };
}
Note: Our API catches all RFC violations, but client-side pre-validation can reduce unnecessary API calls.
Always validate your email list before sending to maintain high deliverability and protect your sender reputation. Invalid emails hurt your domain reputation.
For unknown results, consider retrying later or using Email Finder to verify the specific address exists before adding to campaigns.
For large lists, batch your requests to stay within rate limits. Use the response headers to monitor your remaining quota.
const remaining = response.headers.get('RateLimit-Remaining');
if (remaining < 100) {
  await sleep(1000); // Slow down if approaching limit
}
Every response includes X-Credits-Remaining so you can track spending without extra API calls.

Use Cases

List Cleaning

Validate email lists before campaigns to reduce bounces and protect sender reputation.

Form Validation

Validate emails at point of capture to ensure data quality from the start.

CRM Hygiene

Regularly validate CRM contacts to maintain deliverability rates.

Lead Scoring

Use validation status as a lead quality signal in your scoring models.

Authorizations

X-API-Key
string
header
required

Your LeadMagic API key. Header name is case-insensitive (X-API-Key, X-API-KEY, x-api-key all work).

Body

application/json
email
string<email>
required

Email address to validate

Example:

"jesse@leadmagic.io"

Response

Successful validation

email
string
Example:

"jesse@leadmagic.io"

email_status
string
Example:

"valid"

is_domain_catch_all
boolean

Whether the email domain is a catch-all (accepts all addresses)

Example:

false

credits_consumed
number
Example:

0.25

message
string
Example:

"Email is valid."

mx_record
string
Example:

"aspmx.l.google.com"

mx_provider
string
Example:

"Google Workspace"

mx_gateway
string | null

Security gateway vendor name

Example:

null

mx_gateway_type
string | null

Security gateway type

Example:

null

mx_security_gateway
boolean
Example:

false

company_name
string
Example:

"Leadmagic"

company_industry
string
Example:

"Internet"

company_size
string
Example:

"11-50"

company_founded
integer
Example:

2022

company_type
string
Example:

"Private"

company_location
object
company_linkedin_url
string
Example:

"linkedin.com/company/leadmagichq"

company_linkedin_id
string
Example:

"75153174"

company_facebook_url
string | null
Example:

null

company_twitter_url
string | null
Example:

null