Sign Up Free

How to Verify Email Addresses with an API — Developer Guide

Integrate real-time email verification into your application using our REST API. Authentication, endpoints, code examples, and best practices.

Step-by-Step Instructions

  1. Get your API key — Sign up at ev.ecomtechbd.com. Go to Dashboard then API Keys. Generate and securely store your key.
  2. Install an SDK (optional) — npm install @ev-ecomtechbd/node (Node.js), pip install ev-email-verifier (Python), composer require ev-ecomtechbd/php-sdk (PHP), or use HTTP directly.
  3. Make your first request — POST to https://api.ev.ecomtechbd.com/v1/verify with the email in JSON body and API key in Authorization: Bearer header.
  4. Handle the response — The API returns status (deliverable/undeliverable/risky/unknown), score (0-100), and flags for disposable, role-based, catch-all.
  5. Implement error handling — Handle HTTP 400 (invalid format), 401 (bad key), 429 (rate limited), 500 (server error). SDKs throw typed exceptions.
  6. Add rate limiting awareness — Check X-RateLimit-Remaining headers. Use the batch endpoint for high-volume verification (up to 50,000 per request).
  7. Test in sandbox mode — Add X-EV-Sandbox: true header during development. See our sandbox documentation.

Tips

Never expose API keys in client-side code. Use environment variables for key storage. Implement caching to avoid re-verifying the same email.

Why This Matters

Integrating email verification directly into your application through an API is the most reliable way to ensure data quality at scale. Manual verification workflows that rely on exporting, uploading, and re-importing introduce delays, human error, and gaps where unverified addresses can slip into your system. An API integration verifies every email address programmatically at the exact moment it matters — during user registration, form submission, CRM import, or before a campaign send. This real-time approach eliminates the entire category of problems caused by batch-processing delays and ensures your database never accumulates invalid addresses in the first place.

For development teams building SaaS products, marketplaces, or platforms with user registration, API-based email verification is essential for reducing fake signups and improving user quality. Invalid and disposable email addresses are commonly used to create throwaway accounts, exploit free trials, and abuse referral programs. By verifying emails at the API level, you block these problematic signups before they consume server resources, skew your user metrics, or create support overhead. The cost of verifying an email address through an API is a fraction of a cent, while the cost of dealing with a fraudulent account can run into dollars or more.

Pro Tips

  • Implement response caching — Store verification results in your database or cache layer (Redis, Memcached) with a TTL of 7-30 days. This prevents redundant API calls for the same email address across multiple verification touchpoints in your application and significantly reduces your API usage costs.
  • Use webhook callbacks for batch verification — When verifying large batches through the API, use the webhook callback feature rather than polling for results. This is more efficient, reduces your server load, and provides immediate notification when results are ready rather than requiring you to implement polling logic with retry delays.
  • Build a verification middleware layer — Create a reusable middleware or service class that wraps the verification API. This centralized layer handles authentication, error handling, caching, and result parsing in one place, making it easy to add verification to any endpoint in your application without duplicating code.
  • Set appropriate timeouts with fallback logic — Configure your API client with a 3-5 second timeout. If the verification API is unreachable or slow, fall back to basic syntax validation and queue the email for async verification later. Never block a user registration entirely because of a temporary API issue.
  • Log all verification results for analytics — Store the full API response including status, score, flags, and timestamp. Over time, this data reveals patterns about your signup quality, identifies problematic traffic sources, and helps you fine-tune your verification rules based on actual conversion data.

Common Mistakes to Avoid

  • Exposing API keys in client-side code — Never include your API key in JavaScript that runs in the browser, mobile app code, or any client-accessible bundle. Anyone can inspect your frontend code and steal the key to make unauthorized API calls on your account. Always make verification calls from your server-side backend and proxy results to the frontend as needed.
  • Not implementing retry logic for transient failures — Network issues, rate limits, and temporary server errors happen in any API integration. If your code does not retry failed requests with exponential backoff, you will miss verifications during brief outages. Implement a retry strategy with 2-3 attempts and increasing delays (1s, 2s, 4s) before falling back to syntax-only validation.
  • Treating all non-valid results the same — The API returns nuanced results including deliverable, undeliverable, risky, catch-all, disposable, and role-based flags. Treating everything except "deliverable" as invalid is too aggressive and will reject legitimate users. Build logic that handles each status appropriately: block undeliverable and disposable, warn on risky, and allow catch-all with monitoring.
  • Verifying on every keystroke or blur event — Some developers trigger API verification on every input field blur or keystroke, which burns through API credits rapidly as users type and correct their email address. Only verify when the user explicitly submits the form, or at minimum debounce the verification call by several seconds after the user stops typing to avoid wasteful repeat calls.

Frequently Asked Questions

Our REST API works with any language that supports HTTP requests. We provide official SDKs for Node.js, Python, PHP, Ruby, Java, Go, and C#. For other languages, use any HTTP client to call our REST endpoints.

Check the X-RateLimit-Remaining header in each response. When it reaches zero, wait until the X-RateLimit-Reset timestamp. Our SDKs handle rate limiting automatically with exponential backoff. For high-volume applications, use the batch endpoint which accepts up to 50,000 emails per request.

Yes, add X-EV-Sandbox: true to any API request to use sandbox mode. Sandbox requests return deterministic results without consuming credits. Use it to test your integration, handle edge cases, and validate error handling before going to production. See our sandbox documentation.

Verify Your Email List — Free, Fast, Accurate

Get 100 daily free verifications. No credit card required. Visit our email verifier for complete verification.

Try our free email verifier — verify any email instantly, no signup required. Need bulk verification? Upload your list and clean thousands of emails in minutes.

Developers: integrate email verification into your app with our RESTful API — SDKs for 7 languages.