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
{
"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:
| Check | Description |
|---|
| Syntax | RFC-compliant email format validation |
| MX Records | Verify domain has valid mail servers |
| Mailbox | SMTP-level check if mailbox exists |
| Disposable | Detect temporary email services |
| Role | Flag role-based addresses (info@, support@) |
| Free | Identify free email providers (gmail, yahoo) |
Confidence Levels
The API returns a confidence level for each validation:
| Confidence | Description | Recommended Action |
|---|
high | Email is definitely valid | Safe to send |
medium | Email might be valid | Send with caution |
low | Email is likely invalid | Do 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
| Plan | Credits | Price |
|---|
| Free | 1,000 credits | $0/forever |
| Pro | 100,000 credits/month | $29/month |
Each validation uses 1 credit. Free plan credits are one-time. Pro plan credits refresh monthly.
Best Practices
- Validate at signup - Catch invalid emails before they enter your database
- Use suggestions - Show typo corrections to users (e.g., “Did you mean gmail.com?”)
- Block disposable emails - Prevent abuse from temporary email services
- Handle role addresses - Consider whether to allow info@, support@, etc.
- Re-validate periodically - Email addresses can become invalid over time
Next Steps