Real SMTP mailbox checks — Unknown results are never charged.

Home / Blog / Using the OffBounce API to Verify Emails in Bulk: A Practical Guide

Using the OffBounce API to Verify Emails in Bulk: A Practical Guide

Verify emails from your own code with the OffBounce API: auth, single and bulk verification, jobs, credits, webhooks, and the mistakes that waste credits. · 2026-11-18 · 12 min read

Using the OffBounce API to Verify Emails in Bulk: A Practical Guide

Verifying emails through a web dashboard works well for occasional lists, but many senders need verification inside their own systems: a signup form that checks an address as it is typed, a CRM that verifies new contacts overnight, an application that cleans a list before importing it. That is what the OffBounce API is for. It exposes the same nine checks that run in the dashboard, over HTTPS, so any application can verify one address or a hundred at a time, check a job's progress, and read the results back as structured data.

This post is a practical guide to using the API: authentication, the endpoints, the request and response formats, bulk jobs, credits, webhooks, and the mistakes that waste time and allowance. It assumes you can make an HTTP request from your language of choice, and it gives examples in cURL, PHP, Python, and JavaScript so you can adapt them to your own stack.

Authentication: your API key

Every API request is authenticated with an API key, sent in the X-API-Key header. You create keys in your OffBounce account, under the API section, and each key can be named so you know which system is using it. A key for the production signup form and a key for a testing script should be different keys, so that revoking one does not break the other.

Treat the key like a password. Do not put it in client-side JavaScript, where anyone viewing the page can read it. Do not commit it to a public repository. Do not share it in a chat message or an email. If a key is exposed, revoke it in the account and create a new one. Requests made with a missing or invalid key return a 401 error, and requests made with a revoked key return the same — the API does not distinguish between the two, so that an attacker cannot tell whether a key was ever valid.

The API also enforces a rate limit of 60 requests per minute per key. If you exceed it, the API returns a 429 error, and you should wait before retrying. The limit is generous for normal use — a bulk job of a hundred addresses is one request — but it will catch a script that verifies addresses one at a time in a tight loop. If your use case needs more, contact support rather than working around the limit.

Verifying a single address

The simplest endpoint verifies one address. Send a POST request to /api/v1/verify with a JSON body containing the address, and the API returns the result: the status, the sub-status, the reason, and the quality score. The check runs the full pipeline — syntax, DNS and MX, the SMTP probe, catch-all detection, disposable and role flags, spam-trap risk, and greylisting — so a single verification is as thorough as a bulk job, just for one address.

Here is the request in cURL:

curl -X POST https://my.offbounce.com/api/v1/verify   -H "X-API-Key: YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"email": "sara@acmecorp.com"}'

And a successful response looks like this:

{
  "email": "sara@acmecorp.com",
  "status": "Valid",
  "sub_status": "mailbox_exists",
  "reason": "The mail server accepted the address.",
  "score": 98
}

A single verification is instant for format problems and takes a few seconds when the SMTP probe has to run. It is the right endpoint for a signup form, where the user is waiting for an answer, and for any place where addresses arrive one at a time.

Verifying in bulk

For larger volumes, send up to 100 addresses in one request to /api/v1/verify/bulk. The API creates a verification job, returns a job ID, and processes the addresses in the background. You then check the job's status with a GET request to /api/v1/job/{id}, and download the results when the job is complete.

curl -X POST https://my.offbounce.com/api/v1/verify/bulk   -H "X-API-Key: YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"emails": ["sara@acmecorp.com", "john@example.com", "info@company.com"]}'

The response gives you the job ID and the number of addresses accepted:

{
  "job_id": "job_9f2c41a7",
  "accepted": 3,
  "status": "queued"
}

Poll the job endpoint until the status is "complete", then read the results. Do not poll aggressively — once every few seconds is enough for a small job, and once every thirty seconds for a large one. Polling every second will hit the rate limit and will not make the job finish faster. For very large lists, it is better to split the list into chunks of a few thousand addresses and submit them as separate jobs, so that a failure in one chunk does not affect the others and progress is visible throughout.

Understanding the response

Every result, single or bulk, has the same shape: an email, a status, a sub-status, a reason, and a score. The statuses are Valid, Invalid, Catch-all, Disposable, Role-based, Spam-trap risk, and Unknown. The sub-status is more specific: mailbox_exists, domain_not_found, no_mx_record, invalid_syntax, catch_all, disposable, role_based, greylisted, and others. The reason is a sentence in plain language. The score is a number from 0 to 100.

Your code should decide on the status and the sub-status, not on the score alone. A catch-all address and an Unknown address can have the same score and need different handling. A role address with a high score is still a role address. Write the decision logic around the statuses — remove Invalid, Disposable and Spam-trap risk; segment Catch-all and Role; retry Unknown — and use the score only to order the work inside each group.

Handle the Unknown status explicitly. It means the check could not give a clear answer, and the right action is to retry the address later or leave it out of the send, not to treat it as Valid or Invalid by default. Code that treats Unknown as Valid will mail addresses that were never confirmed; code that treats it as Invalid will delete addresses that may be real. Both are wrong, and both are avoidable by handling the status on its own terms.

Credits and the balance endpoint

Verification through the API uses the same allowance as the dashboard: your plan's daily verification volume. A GET request to /api/v1/credits returns your current balance and the plan's limits, so your application can check before submitting a large job whether the allowance covers it. Unknown results are never charged, duplicates inside a job are free, and suppressed addresses are skipped free — the same rules as in the dashboard.

Check the balance before a large job, and handle the 402 response — insufficient allowance — gracefully. A 402 means the job would exceed the available allowance, and the job is not created. The correct response is to tell the user, or to split the job into smaller pieces that fit the allowance, not to retry the same request in a loop.

Webhooks: getting notified when a job finishes

Polling works, but webhooks are better for large jobs. When you create a bulk job, you can give the API a webhook URL, and OffBounce will send a POST request to that URL when the job finishes, with the job ID and the final status. Your application can then fetch the results, without polling.

Webhook requests are signed with HMAC, using a secret that you set in your account. Your endpoint should verify the signature before trusting the payload — the signature is computed over the request body with your secret, and if it does not match, the request did not come from OffBounce. It should also respond quickly, with a 200 status, and do the heavy work — fetching the results, updating your database — after responding, so that a slow handler does not cause the webhook to be retried.

It is worth handling duplicate webhook deliveries. A webhook may be delivered more than once if the first delivery times out, so your endpoint should be idempotent: receiving the same job completion twice should have the same effect as receiving it once. The simplest way is to record the job ID and ignore a notification for a job that has already been processed.

Error handling

The API uses standard HTTP status codes, and your code should handle each one:

For every error, log the status code, the response body, and the request that caused it. The response body usually contains a message explaining the problem, and that message is the fastest route to a fix. A script that logs nothing and retries blindly will waste allowance and time.

Code examples

A PHP example for a single verification:

$ch = curl_init('https://my.offbounce.com/api/v1/verify');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  'X-API-Key: YOUR_API_KEY',
  'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['email' => $email]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
if (($response['status'] ?? '') === 'Valid') {
  // Safe to accept the address.
}

A Python example for a bulk job:

import requests, time
headers = {'X-API-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json'}
job = requests.post('https://my.offbounce.com/api/v1/verify/bulk',
  headers=headers, json={'emails': emails}).json()
job_id = job['job_id']
while True:
  status = requests.get(f'https://my.offbounce.com/api/v1/job/{job_id}',
    headers=headers).json()
  if status['status'] == 'complete':
    break
  time.sleep(10)
results = status['results']

A JavaScript example for a signup form, calling your own server rather than the API directly — the key must never be exposed in the browser:

// Browser code calls your server, which calls the OffBounce API.
const res = await fetch('/api/check-email', {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({email: input.value})
});
const result = await res.json();
if (result.status === 'Disposable') {
  showMessage('Please use a permanent email address.');
}

Mistakes that waste your allowance

Testing your integration before you rely on it

An API integration that has never been tested with real data will fail at the worst moment — during a launch, a large import, or a campaign that depends on it. Testing should start with the smallest possible case: a single verification of an address you control, checking that the request, the authentication, and the response all work as expected. From there, test each status deliberately. A disposable domain should return Disposable. A mistyped domain should return Invalid. A catch-all domain should return Catch-all. A greylisted address should return Unknown. If the responses do not match the expected statuses, the problem is in the request or in the handling, and it is better to find it with five test addresses than with five thousand real ones.

Test the error paths too. Send a request with a bad key and confirm you get a 401. Send a bulk request with 101 addresses and confirm you get a 400. Submit a job larger than your allowance and confirm you get a 402. These tests prove that your error handling works, and they are the tests that save you when the real system hits the same conditions. It is also worth testing the webhook endpoint with a signed request, confirming that the signature verification accepts a genuine notification and rejects a forged one — a webhook that accepts anything is a security problem, not a convenience.

Once the integration is live, monitor it. Log every request and response, with the job ID, the number of addresses, the statuses returned, and the time taken. Watch the allowance: a job that consumes the whole day's volume in an hour is a sign that something is verifying addresses it should not be — usually a loop, a cache that is not working, or a form that verifies the same address on every keystroke. Set an alert for the 429 response, so that a rate-limit problem is noticed in minutes rather than discovered at the end of the day. An integration that is monitored is an integration that can be trusted, and the monitoring is what turns a working script into a reliable part of the system.

The API is the same verification as the dashboard, exposed for automation. Use it to check addresses at signup, to clean lists inside your own systems, and to keep your data fresh without manual uploads. Treat the key carefully, handle the statuses honestly, and let the webhooks and the bulk endpoint do the heavy work — and the API will save far more time than it costs to integrate.

Try it on your own list

Verify your list with the same 9 checks described above — Unknown results free, no setup fee.

Try the Live Demo Create a Free Account

Keep reading

← All posts

Ready to Reach the Inbox?

Clean your list, strengthen your sender reputation, and send with confidence.

✉ Create a free account and verify your first addresses today.