How to use Zerobounce API for real time email verification in B2B campaigns

If you send cold emails for B2B campaigns, you know the pain of high bounce rates. Bad emails waste your time, kill deliverability, and can even get you blacklisted. The fix? Real-time email verification. This guide shows you, step by step, how to use the Zerobounce API to stop bad emails before they hit your CRM or outreach tools.

No fluff—just what works (and what to skip) so you can clean your lists as you go, not after the damage is done.


Why Real-Time Email Verification Matters for B2B

You might think, “I’ll just scrub my list every month.” That’s better than nothing, but in B2B, emails go stale fast. People change jobs, domains switch hands, and companies rebrand constantly. If you’re loading up a list from a webinar or a lead gen form, you want to check those emails before they get used or sent to sales.

Here’s what real-time verification gets you:

  • Fewer bounces: Protects your sender reputation and keeps your domain off blacklists.
  • Cleaner CRM: No more junk emails polluting your pipeline.
  • Time saved: Sales and marketing aren’t wasting time on dead leads.
  • Fewer headaches: Less risk of getting flagged as spam.

Batch verification is fine for old lists, but to keep things tight, you need to vet every email as it comes in.


Step 1: Get Your Zerobounce API Key

First, sign up for a Zerobounce account. The free tier gives you a few credits to play with, but for any real use, you’ll need to pay—it’s not expensive, but keep an eye on usage if you’re verifying thousands of emails.

  • Log in and go to your dashboard.
  • Navigate to the API section.
  • Copy your API key. Treat it like a password (don’t share it in public repos).

Pro tip: Set up separate API keys for dev and production. This keeps your live data safe and lets you test without messing things up.


Step 2: Understand the Zerobounce Real-Time API

Zerobounce’s real-time API is straightforward. You make a GET or POST request to their endpoint with an email address, and they reply with a verdict.

The result tells you if the email is valid, invalid, or something in between (“catch-all” or “do not mail” addresses). Here’s what matters:

  • valid: Safe to use.
  • invalid: Don’t bother.
  • catch-all: The domain accepts any email—could be good or could bounce.
  • spamtrap, abuse, or do_not_mail: Avoid these.

Don’t overthink the other fields unless you’re doing something fancy.

Endpoint:
https://api.zerobounce.net/v2/validate

Required parameters: - api_key (string) - email (string)

Optional: ip_address (for extra fraud detection, but not required)


Step 3: Test the API Call

Before you wire this into your platform, test the API with a tool like curl, Postman, or your browser. Here’s a basic example using curl:

bash curl "https://api.zerobounce.net/v2/validate?api_key=YOUR_API_KEY&email=test@example.com"

A successful response looks like:

json { "address": "test@example.com", "status": "valid", "sub_status": "", "free_email": false, "mx_found": true, "did_you_mean": "", "domain_age_days": "7600", "smtp_provider": "gmail", ... }

If you get an error, double-check: - Your API key is correct. - Your email is properly formatted. - You’re not over your quota.

Don’t waste time on the extra fields unless you really need them. Ninety percent of the time, status is all you care about.


Step 4: Plug the API into Your Workflow

This is where most folks over-engineer things. Here’s the simplest way to do it:

For Lead Capture Forms

If you’re capturing emails on your site (think: demo requests, content downloads):

  • On form submit, call the Zerobounce API in the background.
  • If the result is valid, let the submission go through.
  • If not, show a polite error (“Please enter a valid business email.”)

Don’t call the API on every keystroke. Just do it once, on submit—anything else is overkill and will eat up your credits.

Example (JavaScript using fetch):

js async function verifyEmail(email) { const apiKey = 'YOUR_API_KEY'; const url = https://api.zerobounce.net/v2/validate?api_key=${apiKey}&email=${encodeURIComponent(email)}; const response = await fetch(url); const data = await response.json(); return data.status === 'valid'; }

For CRM or Marketing Automation Imports

If you’re importing CSVs or syncing leads:

  • Run each email through the API before adding to your CRM.
  • Only import leads marked as valid.
  • Flag or quarantine “catch-all” and “unknown” statuses for manual review.

Note: Zerobounce also offers batch endpoints, but for real-time use, stick with single email validation.


Step 5: Handle Edge Cases and “Weird” Results

Not every email will come back as “valid” or “invalid.” Here’s how to handle the gray area:

  • catch-all: Many business domains accept any address; some will still bounce. Up to you if you want to risk it—just know it’s not guaranteed.
  • unknown: Server didn’t respond. Usually safe to retry later, but don’t hammer the API.
  • spamtrap/abuse/do_not_mail: Never send to these. Remove from your pipeline.
  • role-based (e.g., info@, sales@): These are sometimes flagged as riskier. Decide if you want to allow them—depends on your business.

Pro tip: Don’t get analysis paralysis. For most B2B campaigns, “valid” is good, “invalid” is out, and the rest are up to your appetite for risk.


Step 6: Respect Rate Limits and Privacy

Don’t hammer the API like a stress test. Zerobounce enforces rate limits, and you don’t want to get blocked mid-campaign.

  • Check the docs for your plan’s limit.
  • If you need to verify thousands of emails quickly, stagger requests or use their batch endpoint (just not for real-time entry).

Data privacy: Don’t send more data than you need. Just the email address is enough. Zerobounce is GDPR compliant, but you still need to handle data responsibly on your end.


What Works, What Doesn’t, and What to Ignore

  • Works: Real-time verification stops bad leads at the door, protects your sender score, and saves your team time. It’s worth the (modest) cost.
  • Doesn’t work: Trying to “clean” lists with sketchy free tools, or verifying only once and forgetting about it. Things change—keep checking.
  • Ignore: Fancy scoring systems or overanalyzing sub-status codes unless you’re at massive scale. For most folks, simple is best.

Watch out for: Overusing API calls (cost can add up), and assuming “catch-all” is always safe. It’s not.


Keep It Simple, Test, and Iterate

Get the basics working first—hook up Zerobounce to your forms or imports, filter out the obviously bad emails, and move on. Don’t chase edge cases or get bogged down in every possible scenario. If you start seeing weird results or complaints, tweak your logic. Otherwise, let the tool do its job so you can focus on actual selling.

Real-time email verification isn’t magic, but it’s as close as you’ll get to keeping your B2B campaigns running smoothly. And honestly? That’s enough.