Tutorialemail-validationapideliverability

Email Validation API: Best Practices for Reducing Bounce Rates

Learn how to validate emails at signup, detect disposable addresses, and improve deliverability with KhaleejiAPI's Email Validation API.

KhaleejiAPI TeamFebruary 25, 20265 min read

Why Validate Emails?

Invalid email addresses cost businesses real money. High bounce rates damage your sender reputation, trigger spam filters, and reduce deliverability for legitimate emails. A single validation call can prevent all of this.

Quick Start

const res = await fetch('https://khaleejiapi.dev/api/v1/email/validate?email=user@example.com', {
  headers: { 'X-API-Key': 'YOUR_KEY' }
});
const data = await res.json();

The response includes:

  • Format check — Is it a syntactically valid email?
  • Domain check — Does the domain exist with MX records?
  • Disposable detection — Is it a temporary/throwaway address? (500+ providers detected)
  • Deliverability score — 0–100 confidence score
  • Provider identification — Gmail, Outlook, Yahoo, custom domain

Best Practices

1. Validate at Signup

Don't wait until you send the first email. Validate during registration:

async function validateEmail(email: string): Promise<boolean> {
  const res = await fetch(
    https://khaleejiapi.dev/api/v1/email/validate?email=${encodeURIComponent(email)},
    { headers: { 'X-API-Key': process.env.KHALEEJI_API_KEY! } }
  );
  const { data } = await res.json();
  return data.deliverabilityScore >= 70 && !data.isDisposable;
}

2. Block Disposable Emails

Disposable email services (Mailinator, Guerrilla Mail, etc.) are commonly used for abuse:

if (data.isDisposable) {
  return { error: 'Please use a permanent email address' };
}

3. Use the Deliverability Score

The score combines multiple signals into a single 0–100 number:

ScoreMeaningAction
80–100High confidenceAccept
50–79Moderate riskAccept with verification email
0–49High riskReject or manual review

4. Cache Results

Email validity doesn't change often. Cache results for 24–48 hours to reduce API calls:

const cacheKey = email:valid:${email.toLowerCase()};
const cached = await redis.get(cacheKey);
if (cached) return JSON.parse(cached);

const result = await validateEmail(email); await redis.set(cacheKey, JSON.stringify(result), 'EX', 86400); // 24h

Integration with Signup Flows

Here's a complete React example:

const [emailStatus, setEmailStatus] = useState<'idle' | 'checking' | 'valid' | 'invalid'>('idle');

const handleEmailBlur = async (email: string) => { setEmailStatus('checking'); const res = await fetch(/api/validate-email?email=${email}); const { valid } = await res.json(); setEmailStatus(valid ? 'valid' : 'invalid'); };

Pricing

Email validation is included in all plans:

  • Free: 1,000 validations/month
  • Starter: 50,000/month
  • Pro: 500,000/month
  • Business: Unlimited
Sign up for free and start validating emails today.