Skip to main content

Why Validate Emails?

Email validation helps you:
  • Reduce bounce rates by up to 98%
  • Protect your sender reputation from hard bounces
  • Save money by not sending to invalid addresses
  • Improve deliverability by maintaining a clean list

Validating a Single Email

Use the validation API to check if an email address is valid before sending.
curl -X POST https://www.unosend.co/api/v1/validation/verify \
  -H "Authorization: Bearer un_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com"
  }'

Response

response.json
{
  "email": "user@example.com",
  "valid": true,
  "confidence": "high",
  "checks": {
    "syntax": true,
    "mx": true,
    "mailbox": true,
    "disposable": false,
    "role": false,
    "free": true
  },
  "suggestion": null
}

Validation Checks

Each validation performs multiple checks:
CheckDescription
SyntaxRFC-compliant email format validation
MX RecordsVerify domain has valid mail servers
MailboxSMTP-level check if mailbox exists
DisposableDetect temporary email services
RoleFlag role-based addresses (info@, support@)
FreeIdentify free email providers (gmail, yahoo)

Confidence Levels

The API returns a confidence level for each validation:
ConfidenceDescriptionRecommended Action
highEmail is definitely validSafe to send
mediumEmail might be validSend with caution
lowEmail is likely invalidDo not send

Validate at Signup

The best time to validate is at the point of capture. Here’s an example signup form:
async function handleSignup(email) {
  // Validate email first
  const validation = await fetch('https://www.unosend.co/api/v1/validation/verify', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer un_your_api_key',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ email })
  }).then(r => r.json());

  if (!validation.valid) {
    if (validation.suggestion) {
      return { error: `Did you mean ${validation.suggestion}?` };
    }
    return { error: 'Please enter a valid email address' };
  }

  if (validation.checks.disposable) {
    return { error: 'Please use a non-disposable email address' };
  }

  // Proceed with signup
  await createUser(email);
}

Bulk Validation

Validate thousands of emails at once by uploading a CSV file in the dashboard, or use the bulk API:
curl -X POST https://www.unosend.co/api/v1/validation/list \
  -H "Authorization: Bearer un_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "emails": [
      "user1@example.com",
      "user2@example.com",
      "invalid@nonexistent.xyz"
    ]
  }'
Bulk validation is available on Pro plan only. Free plan users should use the single email validation endpoint.

Pricing

PlanCreditsPrice
Free1,000 credits$0/forever
Pro100,000 credits/month$29/month
Each validation uses 1 credit. Free plan credits are one-time. Pro plan credits refresh monthly.

Best Practices

  1. Validate at signup - Catch invalid emails before they enter your database
  2. Use suggestions - Show typo corrections to users (e.g., “Did you mean gmail.com?”)
  3. Block disposable emails - Prevent abuse from temporary email services
  4. Handle role addresses - Consider whether to allow info@, support@, etc.
  5. Re-validate periodically - Email addresses can become invalid over time

Next Steps