Response Format

All nofakemails API responses follow a consistent JSON structure with predictable field types and values. This page covers the response formats for single email validation, batch validation, and error responses.

Single Email Validation

Returned by the GET /v1/email/{email} endpoint when validating a single email address. The response contains all validation results as a flat JSON object.

{
  "email": "user@example.com",
  "valid": true,
  "normalized": "user@example.com",
  "local_part": "user",
  "alias": false,
  "ascii": true,
  "role": null,
  "gibberish": false,
  "gibberish_score": 0.12,
  "domain": "example.com",
  "mx": true,
  "disposable": false,
  "public": false,
  "relay": false,
  "typo": false,
  "typo_suggestion": null
}

Email Attributes

FieldTypeDescription
emailstringThe original email address that was validated
validbooleanIndicates whether the email address has valid format according to RFC 5322
normalizedstring | nullNormalized/standardized version of the email address (lowercase)
local_partstring | nullThe local part of the email address (before the @ symbol)
aliasbooleanIndicates whether the email contains a plus tag (e.g., user+tag@example.com)
asciibooleanIndicates whether the email address contains only ASCII characters
rolestring | nullThe role category if this is a role-based email (e.g., "Admin", "Support", "Sales"). Null if not a role account.
gibberishbooleanIndicates whether the email's local part appears to be randomly generated gibberish
gibberish_scorenumberConfidence score for gibberish detection (0.0 to 1.0). Higher values indicate a higher likelihood of gibberish.

Domain Attributes

FieldTypeDescription
domainstring | nullThe domain portion of the email address (after the @ symbol)
mxbooleanIndicates whether the domain has valid MX (Mail Exchange) records configured
disposablebooleanIndicates whether the domain is a known disposable/temporary email provider
publicbooleanIndicates whether the domain is a public email provider (Gmail, Yahoo, Outlook, etc.)
relaybooleanIndicates whether the domain is an email relay/forwarding service
typobooleanIndicates whether the domain appears to be a typo of a common email provider
typo_suggestionstring | nullSuggested correction if the domain appears to be a typo (e.g., "gmail.com" for "gmial.com")

Examples

Valid Gmail Address

{
  "email": "john.doe@gmail.com",
  "valid": true,
  "normalized": "john.doe@gmail.com",
  "local_part": "john.doe",
  "alias": false,
  "ascii": true,
  "role": null,
  "gibberish": false,
  "gibberish_score": 0.08,
  "domain": "gmail.com",
  "mx": true,
  "disposable": false,
  "public": true,
  "relay": false,
  "typo": false,
  "typo_suggestion": null
}

Disposable Email Detected

{
  "email": "test@mailinator.com",
  "valid": true,
  "normalized": "test@mailinator.com",
  "local_part": "test",
  "alias": false,
  "ascii": true,
  "role": null,
  "gibberish": false,
  "gibberish_score": 0.10,
  "domain": "mailinator.com",
  "mx": true,
  "disposable": true,
  "public": false,
  "relay": false,
  "typo": false,
  "typo_suggestion": null
}

Role Account Email

{
  "email": "support@example.com",
  "valid": true,
  "normalized": "support@example.com",
  "local_part": "support",
  "alias": false,
  "ascii": true,
  "role": "Support",
  "gibberish": false,
  "gibberish_score": 0.05,
  "domain": "example.com",
  "mx": true,
  "disposable": false,
  "public": false,
  "relay": false,
  "typo": false,
  "typo_suggestion": null
}

Gibberish Detected

{
  "email": "xkq7zmt9v@gmail.com",
  "valid": true,
  "normalized": "xkq7zmt9v@gmail.com",
  "local_part": "xkq7zmt9v",
  "alias": false,
  "ascii": true,
  "role": null,
  "gibberish": true,
  "gibberish_score": 0.92,
  "domain": "gmail.com",
  "mx": true,
  "disposable": false,
  "public": true,
  "relay": false,
  "typo": false,
  "typo_suggestion": null
}

Email Alias (Plus Tag)

{
  "email": "user+newsletter@example.com",
  "valid": true,
  "normalized": "user+newsletter@example.com",
  "local_part": "user+newsletter",
  "alias": true,
  "ascii": true,
  "role": null,
  "gibberish": false,
  "gibberish_score": 0.06,
  "domain": "example.com",
  "mx": true,
  "disposable": false,
  "public": false,
  "relay": false,
  "typo": false,
  "typo_suggestion": null
}

Typo Suggestion

{
  "email": "user@gmial.com",
  "valid": true,
  "normalized": "user@gmial.com",
  "local_part": "user",
  "alias": false,
  "ascii": true,
  "role": null,
  "gibberish": false,
  "gibberish_score": 0.11,
  "domain": "gmial.com",
  "mx": false,
  "disposable": false,
  "public": false,
  "relay": false,
  "typo": true,
  "typo_suggestion": "user@gmail.com"
}

Email Relay Service

{
  "email": "user@simplelogin.com",
  "valid": true,
  "normalized": "user@simplelogin.com",
  "local_part": "user",
  "alias": false,
  "ascii": true,
  "role": null,
  "gibberish": false,
  "gibberish_score": 0.11,
  "domain": "simplelogin.com",
  "mx": true,
  "disposable": false,
  "public": false,
  "relay": true,
  "typo": false,
  "typo_suggestion": null
}

Batch Validation

Returned by the POST /v1/emails endpoint when validating multiple email addresses. The response wraps individual results in a batch envelope with summary metadata.

{
  "success": true,
  "partial": false,
  "total": 3,
  "valid_count": 2,
  "invalid_count": 0,
  "error_count": 1,
  "usage_points": 3,
  "processing_time_ms": 245,
  "results": [
    {
      "email": "john.doe@gmail.com",
      "status": "success",
      "result": {
        "email": "john.doe@gmail.com",
        "valid": true,
        "normalized": "john.doe@gmail.com",
        "local_part": "john.doe",
        "alias": false,
        "ascii": true,
        "role": null,
        "gibberish": false,
        "gibberish_score": 0.08,
        "domain": "gmail.com",
        "mx": true,
        "disposable": false,
        "public": true,
        "relay": false,
        "typo": false,
        "typo_suggestion": null
      },
      "error": null
    },
    {
      "email": "test@mailinator.com",
      "status": "success",
      "result": {
        "email": "test@mailinator.com",
        "valid": true,
        "normalized": "test@mailinator.com",
        "local_part": "test",
        "alias": false,
        "ascii": true,
        "role": null,
        "gibberish": false,
        "gibberish_score": 0.10,
        "domain": "mailinator.com",
        "mx": true,
        "disposable": true,
        "public": false,
        "relay": false,
        "typo": false,
        "typo_suggestion": null
      },
      "error": null
    },
    {
      "email": "user@broken-dns.example",
      "status": "error",
      "result": null,
      "error": {
        "code": "DNS_TIMEOUT",
        "message": "DNS lookup timed out for domain"
      }
    }
  ]
}

Batch Envelope Fields

FieldTypeDescription
successbooleanWhether the batch validation request completed successfully
partialbooleanWhether results are partial due to timeout or cancellation
totalintegerTotal number of unique emails processed in the batch
valid_countintegerNumber of emails that passed format validation
invalid_countintegerNumber of emails that failed format validation
error_countintegerNumber of emails that encountered errors during validation
usage_pointsintegerNumber of usage points consumed by this batch request
processing_time_msintegerTime taken to process the batch in milliseconds
resultsarrayPer-email validation results in the same order as the input

Per-Email Result Fields

Each item in the results array contains the following fields. When status is "success", the result object contains the same fields as the single email validation response.

FieldTypeDescription
emailstringThe email address that was validated
statusstringStatus of the validation: "success" or "error"
resultobject | nullThe full validation result when status is "success". Null when status is "error".
errorobject | nullError details when status is "error". Contains code (e.g., "DNS_TIMEOUT") and message fields. Null when status is "success".

Response Interface

Use these type definitions to deserialize the single email validation response in your language of choice.

response.json
{
  "email": "user@example.com",
  "valid": true,
  "normalized": "user@example.com",
  "local_part": "user",
  "alias": false,
  "ascii": true,
  "role": null,
  "gibberish": false,
  "gibberish_score": 0.12,
  "domain": "example.com",
  "mx": true,
  "disposable": false,
  "public": false,
  "relay": false,
  "typo": false,
  "typo_suggestion": null
}
Raw JSON response from the API. All fields are always present.

Role Categories

When the role field is not null, it will contain one of the following categories:

Role CategoryExample Prefixes
Adminadmin, administrator, root, webmaster
Supportsupport, help, helpdesk, service
Salessales, business, partnerships
Marketingmarketing, pr, press, media
Generalinfo, contact, hello, team
NoReplynoreply, no-reply, donotreply
Billingbilling, invoices, payments, accounts
Legallegal, privacy, abuse, dmca
ITpostmaster, hostmaster, security
HRhr, jobs, careers, recruiting

Common Use Cases

Blocking Disposable Emails

if (result.disposable) {
  throw new Error('Disposable email addresses are not allowed');
}

// Continue with registration
await registerUser(result.normalized);

Warning About Role Accounts

if (result.role) {
  console.warn(`Role account detected: ${result.role}`);
  // Show warning to user or allow with lower priority
}

// You might want to allow role accounts but flag them
await registerUser(result.normalized, { isRoleAccount: true });

Handling Typos

if (result.typo && result.typo_suggestion) {
  // Show suggestion to user
  const confirmed = await confirmCorrection(
    `Did you mean: ${result.typo_suggestion}?`
  );

  if (confirmed) {
    // Validate the suggested email instead
    return validateEmail(result.typo_suggestion);
  }
}

Checking Email Deliverability

if (!result.valid) {
  throw new Error('Invalid email format');
}

if (!result.mx) {
  throw new Error('Email domain cannot receive messages');
}

// Email appears deliverable
await sendEmail(result.normalized);

Filtering Aliases

if (result.alias) {
  // Some systems strip plus tags for deduplication
  const baseEmail = result.local_part.split('+')[0] + '@' + result.domain;
  console.log('Base email (without tag):', baseEmail);
}

// Or keep the full email with tag
await registerUser(result.normalized);

Detecting Gibberish Emails

if (result.gibberish) {
  // Flag emails with randomly generated local parts
  console.warn(`Gibberish email detected (score: ${result.gibberish_score})`);

  // Optionally block or require additional verification
  if (result.gibberish_score > 0.8) {
    throw new Error('Email address appears to be randomly generated');
  }
}

Processing Batch Results

const response = await fetch('/api/v1/validate/batch', {
  method: 'POST',
  headers: {
    'X-API-Key': apiKey,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ emails }),
});

const batch = await response.json();

if (batch.partial) {
  console.warn('Batch timed out - some results may be missing');
}

for (const item of batch.results) {
  if (item.status === 'error') {
    console.error(`Failed: ${item.email} - ${item.error.message}`);
    continue;
  }

  if (item.result.disposable) {
    console.log(`Blocked: ${item.email} (disposable)`);
  }
}