API Documentation

Integrate HeroBounce directly into your applications with our high-performance REST API.

Getting Started

The HeroBounce API allows you to programmatically validate emails. Authentication is done via the X-API-Key header.

Get your API Key

You need an API key to make requests. API access is included with Pay As You Go (from $1.05) and every paid plan - see pricing.

Endpoints

POST/validation/single

Validate a single email address in real-time.

Request Body

{
  "email": "john.smith@company.com"
}

Response

{
  "email": "john.smith@company.com",
  "status": "valid",
  "sub_status": "",
  "confirmation": "mail_server_accepted",
  "confidence": 0.95,
  "safe_to_send": true,
  "is_valid": true,
  "details": {
    "syntax_valid": true,
    "dns_valid": true,
    "smtp_valid": true,
    "smtp_code": 250,
    "domain": "company.com",
    "provider": "google",
    "is_disposable": false,
    "is_role_based": false,
    "has_spf": true,
    "has_dmarc": true
  },
  "catchall": {
    "is_catchall": false,
    "confidence": null
  },
  "ai_enhancement": {
    "used": false,
    "method": null
  },
  "performance": {
    "response_time_ms": 1523
  },
  "metadata": {
    "timestamp": 1768842156.42,
    "plan_tier": "pro",
    "features_used": {
      "catchall_detection": true,
      "ai_enhancement": true
    }
  }
}
POST/validation/bulk

Validate up to 1,000 emails in a single API request. Uses 1 credit per unique email (duplicates are free).

Request Body

{
  "emails": [
    "user1@example.com",
    "user2@example.com",
    "user3@example.com"
  ]
}

Response

{
  "total": 3,
  "valid_count": 2,
  "invalid_count": 1,
  "risky_count": 0,
  "duplicate_count": 0,
  "credits_used": 3,
  "results": [
    {
      "email": "user1@example.com",
      "status": "valid",
      "is_valid": true,
      "confidence": 0.95
    },
    ...
  ]
}
POST/bulk/upload/preview

Upload a CSV file for high-volume validation (up to 10,000 emails per file). For larger lists, split into multiple files for faster parallel processing. This is a two-step process.

STEP 1

Upload Preview

Send multipart/form-data with the CSV in the file field.

// Response
{
  "upload_id": "uuid...",
  "filename": "list.csv",
  "columns": ["id", "email", "name"],
  "suggested_email_column": "email"
}
STEP 2

Confirm Processing

POST/bulk/upload/confirm

Confirm which column to use using the upload_id.

// Request
{
  "upload_id": "uuid...",
  "email_column": "email"
}
// Response
{
  "id": "job_uuid...",
  "status": "queued"
}
POST/email-finder/lookup

Find the likely business email of a person from their name and company domain. Costs 10 credits per address found; nothing is charged when no address is found. Available with an API key on every paid plan. Pay As You Go is limited to 3 lookups a day; Starter, Growth and Pro have no daily limit.

One-time setup: before your API key can use Email Finder, sign in and accept the Data Processing Agreement once at Dashboard → Email Finder. Until then the endpoint answers 403 with code DPA_REQUIRED. By sending compliance_accepted: true with each request you confirm you will use the result lawfully (GDPR and similar rules).

Request Body

{
  "first_name": "John",
  "last_name": "Smith",
  "domain": "company.com",
  "compliance_accepted": true,
  "include_catch_all": false
}

include_catch_all (optional): also return addresses on catch-all domains, which cannot be confirmed by the mail server. Charged the same.

Response

{
  "status": "found",
  "email": "john.smith@company.com",
  "confidence": 0.92,
  "method": "Verified via SMTP Handshake",
  "credits_charged": 10,
  "pattern_used": "first.last",
  "expires_at": "2026-11-28T10:15:00+00:00",
  "credits_remaining": 49990,
  "reason": null,
  "message": null
}

status is found, catch_all or not_found.confidence is returned on Starter and above, and is null otherwise. Results are kept for 30 days, then removed.

When nothing is found, reason and message say why, for example no_mx (the domain does not have an MX record), catch_all (the domain accepts any address, so a mailbox cannot be verified), no_format_accepted or dns_error or mail_server_unavailable (retry later). Nothing is charged.

Code Examples

# Single email validation (POST method)
curl -X POST "https://herobounce.com/api/v1/validation/single" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"email": "test@example.com"}'

# Single email validation (GET method - simpler!)
curl -X GET "https://herobounce.com/api/v1/validation/single?email=test@example.com" \
  -H "X-API-Key: your_api_key_here"

# Bulk email validation (up to 1000 emails)
curl -X POST "https://herobounce.com/api/v1/validation/bulk" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"emails": ["user1@example.com", "user2@example.com"]}'

# Bulk CSV Upload (Step 1: Preview)
# Upload file to get upload_id
curl -X POST "https://herobounce.com/api/v1/bulk/upload/preview" \
  -H "X-API-Key: your_api_key_here" \
  -F "file=@/path/to/your/list.csv"

# Bulk CSV Upload (Step 2: Confirm)
# Use upload_id from Step 1
curl -X POST "https://herobounce.com/api/v1/bulk/upload/confirm" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"upload_id": "uuid-from-step-1", "email_column": "email"}'