API Documentation
Integrate BounceZero email verification into your applications.
The BounceZero API provides programmatic access to our 5-stage email verification pipeline. Every email address is evaluated across 40+ signals including syntax validation, DNS and MX record analysis, SMTP mailbox probing, disposable and role-based detection, social signal checks, and Bayesian + ML scoring.
Use the API to verify individual emails in real time, process bulk lists asynchronously, query detailed domain intelligence, and manage your account programmatically.
Pipeline Stages
Authentication
All API requests require authentication via an API key. Include your key in the X-API-Key request header.
You can obtain your API key from the Dashboard under the Integration page. Keep your API key secret and never expose it in client-side code.
Base URL
All API endpoints are relative to the following base URL:
All requests must be made over HTTPS. HTTP requests will be rejected.
Rate Limits
API requests are rate-limited to ensure fair usage and platform stability.
| Plan | Requests per minute | Details |
|---|---|---|
| Free | 30 | Per API key, across all endpoints |
| Starter / Growth | 100 | Per API key, across all endpoints |
| Professional / Business / Scale | 300 | Per API key, across all endpoints |
| Ultimate / Enterprise | 1000 | Per API key, across all endpoints |
When you exceed the rate limit, the API returns a 429 Too Many Requests response. Implement exponential backoff in your integration to handle rate limiting gracefully.
Every authenticated response includes X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers so your client can pace itself before hitting the limit.
Sandbox / Test Mode
Sandbox API keys (prefix bz_test_) let you build and test your integration without consuming credits or triggering real verifications. Every request made with a sandbox key returns a deterministic mock result - no SMTP probe is performed and your balance is never touched.
The local part of the email address you submit selects the internal class. Sandbox responses follow the same binary contract as live keys: classification is valid or invalid, and the selected class is returned in metadata.internal_classification:
| Test address | classification | metadata.internal_classification | score | metadata flags |
|---|---|---|---|---|
| [email protected] | valid | verified | 98 | |
| [email protected] | invalid | invalid | 2 | |
| [email protected] | valid | catch_all | 50 | catch_all_unresolved: true |
| [email protected] | invalid | disposable | 10 | |
| [email protected] | invalid | risky | 25 | |
| [email protected] (or any other local part) | invalid | unknown | 50 | refunded: true |
Any domain works - only the local part matters. Sandbox responses are marked with "confidence": "sandbox" so you can always tell them apart from live results. Rate limits still apply.
Webhooks
Webhooks notify your server when asynchronous work finishes, so you don't have to poll job status. They fire for bulk jobs submitted through the API as well as from the dashboard. Manage webhooks and view delivery logs from your Dashboard, or register one with the API:
url is a query parameter and must be a public https:// URL. The optional request body is a JSON array of event names; omit it to subscribe to all events. Registering the same URL again updates its events.
| Event | Fires when |
|---|---|
| job.completed | A bulk verification job finishes processing. |
| job.stopped | A bulk job is stopped before completion. |
| job.escalated | A bulk job needs attention (e.g., a processing problem was detected). |
| test | Sent when you use the "Test" button in the dashboard. |
Deliveries are JSON POST requests with two headers: X-BounceZero-Event (the event name) and X-BounceZero-Signature (an HMAC-SHA256 of the raw request body, prefixed with sha256=). Your signing secret is shown in the dashboard's webhook settings. Always verify the signature before trusting a payload:
Failed deliveries are retried up to 3 times with exponential backoff (1s, 2s, 4s). Endpoints that fail 5 consecutive deliveries are automatically disabled - re-enable them from the dashboard after fixing your receiver. Webhook URLs must be publicly reachable over HTTPS.
Client Libraries
Official clients with automatic retries (429/5xx with backoff), typed errors, bulk-job helpers, idempotency support, and webhook signature verification - with zero external dependencies.
| Language | Install | Package | Source |
|---|---|---|---|
| Python 3.8+ | pip install bouncezero | PyPI | GitHub |
| Node.js 18+ | npm install bouncezero | npm | GitHub |
| PHP 8.0+ | composer require bouncezero/bouncezero | Packagist | GitHub |
Every client ships a webhook helper - e.g. BounceZero.verify_webhook_signature(raw_body, header, secret) - so you can validate X-BounceZero-Signature in one line. Test your integration risk-free with a sandbox key. Prefer to vendor a single file instead? Download Python, Node.js, or PHP directly.
Verify Single Email
Verify a single email address through the full 5-stage pipeline.
Request Headers
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| X-API-Key | Your API key | Yes |
Request Body
Response
A successful response returns the verification result with a full signal breakdown.
Response Fields
| Field | Type | Description |
|---|---|---|
| classification | string | valid or invalid (binary). See Verification Statuses |
| score | integer | Confidence score from 0 (bad) to 100 (perfect) |
| is_deliverable | boolean | true when classification is valid |
| risk_level | string | low, medium, or high |
| checks | object | Per-check booleans: syntax, domain_valid, not_disposable, not_catch_all, mailbox_verified, and more |
| metadata.internal_classification | string | Detailed internal class: verified, likely_valid, catch_all, invalid, risky, unknown, disposable, spamtrap, or error |
| metadata.refunded | boolean | null | true when the address could not be verified; reported as invalid and the credit is refunded automatically |
| metadata.catch_all_unresolved | boolean | null | true for a catch-all domain that could not be resolved individually; still reported as valid |
Code Examples
Verify Batch
Synchronously verify up to 100 addresses in one request - the call returns once every address is processed. For larger lists, use the asynchronous bulk endpoints.
The response contains a results array (one object per address, same fields as single verification) and a summary object with per-classification counts.
Costs 1 credit per address. Credits for addresses that could not be verified (metadata.refunded: true) are refunded automatically.
Verify Realtime (SSE)
Stream verification results in real time using Server-Sent Events.
This endpoint uses Server-Sent Events (SSE) to stream verification progress as it happens. Each pipeline stage emits an event as it completes, allowing you to display live progress to users.
Request Body
Example (cURL)
Verify Bulk (JSON)
Submit a batch of emails for asynchronous verification.
Request Body
Response
Use the returned job_id to poll for status, retrieve results, or download the completed CSV.
Idempotency: pass an optional Idempotency-Key header (any unique string, max 255 chars) to make retries safe. If a request with the same key is submitted again - for example after a network timeout - the API returns the original job (with an X-Idempotent-Replay: true response header) instead of creating and charging for a duplicate.
Verify Bulk (CSV Upload)
Upload a CSV file containing email addresses for bulk verification.
Send the CSV file as multipart form data. The CSV should contain email addresses, one per row. A header row with email as the column name is recommended.
Example (cURL)
Response
Idempotency: this endpoint also honors the Idempotency-Key header - replaying the same key returns the original job (with X-Idempotent-Replay: true) instead of creating and charging for a duplicate.
Bulk Job Status
Check the progress and status of a bulk verification job.
Response
status is one of queued, processing, interrupted, completed, failed, stopped, or credits_exhausted. An interrupted job resumes automatically, so keep polling; only completed, failed, stopped, and credits_exhausted are final.
Bulk Job Results
Retrieve the verification results for a completed bulk job as JSON.
Response
Bulk Job Download
Download the results of a completed bulk job as a CSV file.
Returns a CSV file with the verification results. The response Content-Type is text/csv. Only available once the job status is completed.
Example
Domain Lookup
Retrieve comprehensive intelligence about an email domain.
Returns detailed domain intelligence including MX records, SPF, DKIM and DMARC configuration, email provider identification, and risk indicators.
Example
Response
Analyze List
Free pre-flight quality analysis of an email list - no verification is performed and no credits are consumed. Use it to gauge list quality before paying for a bulk job.
Returns a quality_score (0-100), total / unique counts, an estimated classification distribution, list-hygiene metrics (duplicates, disposable, role-based, ...), warnings, and actionable recommendations.
Get API Key
Retrieve your current API key.
Response
Generate API Key
Generate a new API key. This will invalidate your previous key.
Response
API Usage Stats
Retrieve your API usage statistics.
Response
Check Balance
Check your remaining verification credit balance.
Response
Response Codes
The API uses standard HTTP status codes to indicate the outcome of each request.
| Code | Status | Description |
|---|---|---|
| 200 | OK | Request succeeded. Response body contains the requested data. |
| 400 | Bad Request | The request body is missing or contains invalid parameters (e.g., malformed email address). |
| 401 | Unauthorized | Missing or invalid API key. Check that the X-API-Key header is present and correct. |
| 402 | Payment Required | Insufficient credits to perform this verification. Top up your balance in the dashboard. |
| 422 | Validation Error | The request body failed validation (wrong types or missing required fields). |
| 403 | Forbidden | Your account does not have access to this resource (e.g., the API key is disabled, expired, or IP-restricted). |
| 429 | Rate Limited | You have exceeded your plan's per-minute rate limit. Wait and retry with exponential backoff. |
| 500 | Internal Error | An unexpected server error occurred. If the problem persists, contact support. |
Error Response Format
Verification Statuses
The classification field is binary: every address is returned as either valid or invalid, based on the analysis of all 40+ signals.
The address is deliverable and safe to send to. Covers confirmed mailboxes (verified), strong multi-signal results (likely_valid), and catch-all domains that could not be resolved individually (catch_all, flagged with metadata.catch_all_unresolved: true and risk_level: medium). is_deliverable is true.
Do not send to this address. Covers definitive rejections (non-existent mailboxes, invalid domains, syntax errors), disposable providers, known spamtrap addresses, addresses with concrete negative signals (risky), and addresses that could not be verified (unknown). is_deliverable is false and risk_level is high. When the address could not be verified, metadata.refunded is true and the credit is refunded automatically.
Internal classification
The detailed class behind each verdict is returned in metadata.internal_classification, so you can apply a stricter or looser policy than the binary verdict:
| internal_classification | classification | Meaning |
|---|---|---|
| verified | valid | SMTP or provider confirmed the mailbox exists. |
| likely_valid | valid | Multiple positive signals, no definitive SMTP confirmation. |
| catch_all | valid | Domain accepts mail for any address; mailbox not individually resolved (catch_all_unresolved: true). |
| invalid | invalid | Mailbox or domain definitively rejected, or syntax error. |
| disposable | invalid | Disposable / temporary email provider. |
| spamtrap | invalid | Known spam-trap address. Details in threat_type. |
| risky | invalid | Concrete negative signals such as a persistently full mailbox or bounce history. |
| unknown | invalid | Could not be verified (server unavailable, greylisting, blocking). refunded: true; retry later. |
| error | invalid | The verification failed with an internal error. |