Email Verification API: A 15-Minute Integration Plan
A practical plan to add an email verification API to a sign-up form or backend: one request, how to treat each result, timeouts, retries and what to log.
An email verification API lets your app ask one question before it saves an address: can this mailbox receive mail? Here is a plan you can finish in about fifteen minutes.
1. Get a key and read the contract
Create an API key in your account (API access is included in every paid plan) and read the Mailbite email verification API page: the request, the answer fields, the limits and the errors. An OpenAPI file is available if you want to generate a client.
2. Make one request
Send the address to the verification endpoint with your key in the header and read the JSON answer. Keep the key on the server, never in browser code.
3. Decide what each result does
- Valid: accept the address.
- Invalid: show a friendly message and ask for another address.
- Risky or unknown: accept it, but mark it so marketing can send carefully.
- Disposable: follow your policy. Many products block these for free trials only.
4. Protect the user experience
- A slow mail server can take up to 45 seconds to answer, so set your timeout to about 45 seconds, but never make the user wait for it: accept the address, verify it in the background and flag it if the result is bad. A slow answer must never block sign-up.
- Run the check on submit, not on every keystroke.
- Show a typo suggestion when one is returned, for example gmail.com instead of gmial.com.
5. Handle limits and errors
Respect the rate limit (up to 1,500 requests a minute per key), retry with a short delay after a 503 and never retry a 401. Log the result category, not the full address, if you want counts for reports.
6. Clean the old list too
The API protects new data. Existing data still needs a one-time clean: upload the list for bulk verification.
7. Test before you ship
Try a valid address, a mistyped domain, a disposable address and an address on a domain with no mail server. Check what the form shows in each case and what happens when the API times out.
Cost
Each check uses one credit, also when the result is unknown; a malformed address or a short outage costs nothing. Paid plans start at $19.90 for 25,000 verifications a month and include API access. See pricing.
A minimal code outline
In plain words, the server side is: take the address from the form, call the verification API with your key, read the "result" field, and decide. If the result is valid, save the address. If it is invalid, return a friendly message. For any other result, save it with a flag so you can review it later. Keep the call behind a timeout, so a slow answer never blocks the sign-up.
What to log
Log the result category and the time it took, not the full address. After a few weeks you can answer useful questions: what share of sign-ups are invalid, which typo suggestions are accepted, and how often the call times out.
Mistakes to avoid
- Putting the API key in browser code. Anyone can read it there.
- Rejecting "risky" addresses outright. Many are real people at companies that accept all mail.
- Checking on every keystroke. Check once, when the form is submitted.
- Forgetting to handle errors such as no credits left (402) or too many requests (429).
When to use the bulk verifier instead
If you have a file with thousands of addresses, upload it to the bulk verifier instead of looping over the API. It is faster, simpler to monitor and gives you a downloadable report.