Base URL

All public API examples use:

https://api.mailbeacon.co

Authentication

Send your MailBeacon API key in the Authorization header.

Authorization: Bearer <your-api-key>

Test emails

These reserved addresses are for testing your integration. They return predictable mock responses and do not cost any tokens.

valid@example.com

Returns a valid result for integration testing.

invalid@example.com

Returns an invalid result for integration testing.

Real-time validation API

Use GET /verify for quick checks from scripts and POST /verify when sending JSON from an application.

GET /verify
curl -H "Authorization: Bearer <your-api-key>" \
  "https://api.mailbeacon.co/verify?email=user@example.com"
POST /verify
curl -X POST https://api.mailbeacon.co/verify \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com"}'

Request parameters

email

Required

The email address to validate.

Success response — Valid email

Envelope status is success and data.status is valid. data.reason is null.

{
  "status": "success",
  "data": {
    "email": "user@example.com",
    "status": "valid",
    "reason": null,
    "is_free": false,
    "suggested_email": "",
    "address_info": {
      "mx_record": "mx.example.com",
      "smtp_provider": "google",
      "domain": "example.com"
    },
    "verified_on": "2026-05-24T19:00:00.000Z"
  }
}

status

success or failure at the envelope level

data.email

The normalized email address that was checked

data.status

valid, invalid, or unknown

data.reason

Reason code when an address is invalid or unknown

data.suggested_email

A correction when MailBeacon can suggest one

data.address_info

Domain, MX, and provider details when available

Success response — Invalid email

Envelope status is still success — the request succeeded — but data.status is invalid or unknown. data.reason explains why.

{
  "status": "success",
  "data": {
    "email": "user@example.com",
    "status": "invalid",
    "reason": "mailbox_not_found",
    "is_free": false,
    "suggested_email": "",
    "address_info": {
      "mx_record": "mx.example.com",
      "smtp_provider": "google",
      "domain": "example.com"
    },
    "verified_on": "2026-05-24T19:00:00.000Z"
  }
}

Reason codes

invalidNot a real or quality email address.

blocked

The domain is on your block list, so it was rejected before any checks ran.

invalid_syntax

The address isn't formatted like a real email.

possible_typo

The address looks misspelled — check suggested_email for the likely fix.

role_based

A shared inbox like info@, admin@, or support@ rather than a person.

disposable

A throwaway, temporary email provider.

no_dns_records

The domain has no mail (MX) records, so it can't receive mail.

unroutable_ip_address

The domain's mail server points to a private IP and can't receive mail.

mailbox_not_found

The address is formatted correctly, but the mailbox doesn't exist.

mailbox_full

The mailbox exists but is over its storage limit and rejecting mail.

unknownWe couldn't confirm the validity of the email address.

catch_all

The server accepts every address, so we can't confirm this specific mailbox exists.

antispam_system

The mail server's spam protection blocked verification.

timeout_exceeded

The mail server took too long to respond.

failed_smtp_connection

We couldn't connect to the mail server.

forcible_disconnect

The mail server dropped the connection mid-check.

greylisted

The server temporarily deferred us — a retry may succeed.

mail_server_did_not_respond

The mail server never responded.

Failure response

{
  "status": "failure",
  "error": "Missing Authorization header"
}

400

Invalid request or missing email

401

Missing or invalid API key

402

Insufficient validation tokens

429

Rate limit exceeded

Bulk validation

Bulk validation is asynchronous. Upload one file as multipart form data, then poll the returned job ID until the result is ready. Creating a job parses the upload and reserves credits, then returns 202 Accepted with the job usually in queued status. It does not wait for validation workers to finish.

POST /bulk/jobs
curl -X POST https://api.mailbeacon.co/bulk/jobs \
  -H "Authorization: Bearer <your-api-key>" \
  -F "file=@subscribers.csv"
202 Accepted
{
  "status": "success",
  "data": {
    "id": "<job-id>",
    "status": "queued",
    "filename": "subscribers.csv",
    "rows": {
      "total": 1000,
      "unique": 950,
      "processed": 0,
      "valid": 0,
      "invalid": 0,
      "unknown": 0,
      "failed": 0,
      "deduplicated": 50
    },
    "credits": {
      "required": 950,
      "available": 5000
    },
    "created_at": "2026-07-09T23:00:00.000Z",
    "completed_at": null,
    "expires_at": null
  }
}

Upload rules

  • • Send exactly one file field with a .csv, .txt, .xls, or .xlsx file.
  • • A job may contain up to 100,000 recognized email rows. The documented upload-size limit also applies; an oversized file or row count is rejected before validation.
  • • TXT files contain one email per non-empty line. CSV, XLS, and XLSX files use a case-insensitive email column header, with a single-column file accepted as a fallback. Ambiguous multi-column files are rejected with a mapping error.
  • • Input order and duplicate rows are preserved in the result. Duplicate normalized addresses are checked once, reuse the same result, and consume only one credit.

Poll, list, cancel, and download

POST /bulk/jobs

Upload a file and create an asynchronous job

GET /bulk/jobs

List your jobs and their current states

GET /bulk/jobs/:id

Poll one job for progress and status

DELETE /bulk/jobs/:id

Cancel an active job

GET /bulk/jobs/:id/result

Download a completed job as CSV

Send the same API key on every request. Poll the status endpoint until the job reaches a terminal state; a successful result download returns text/csv.

The result contains email, status, reason, is_free, suggested_email, domain, mx_record, smtp_provider, and verified_on columns.

List jobs
curl -H "Authorization: Bearer <your-api-key>" \
  "https://api.mailbeacon.co/bulk/jobs"
Poll job status
curl -H "Authorization: Bearer <your-api-key>" \
  "https://api.mailbeacon.co/bulk/jobs/<job-id>"
Cancel a job
curl -X DELETE \
  -H "Authorization: Bearer <your-api-key>" \
  "https://api.mailbeacon.co/bulk/jobs/<job-id>"
Download result CSV
curl -L \
  -H "Authorization: Bearer <your-api-key>" \
  "https://api.mailbeacon.co/bulk/jobs/<job-id>/result" \
  --output validated-emails.csv

Bulk job lifecycle

analyzing

The upload is being parsed and counted.

queued

Credits are reserved and the job is waiting for a worker.

processing

Email validation is in progress.

completed

The result CSV is ready to download.

insufficient_credits

The full reservation could not be made; validation did not start.

failed

The job could not be completed.

cancelled

The job was cancelled and unspent reserved credits refunded.

expired

The seven-day result download window has ended.

Credits and retention

After analysis, MailBeacon atomically reserves enough credits for every unique normalized address before the job enters the queue. If the full amount is unavailable, validation does not start and no partial job is run. Credits are refunded for blocked, test, or unprocessed addresses under the normal charging rules, including work left unprocessed after cancellation or failure.

The original upload is deleted after processing. Completed result CSVs remain available for seven days, after which the job becomes expired and the result can no longer be downloaded.

Need an API key?

Create a free account to receive 100 welcome tokens and generate your first key in the dashboard.