# Upload a list for verification

Source: https://docs.rocketverifier.com/api/bulk-upload
Endpoint: `POST https://api.rocketverifier.com/v1/verify/bulk/upload` (OAuth scope `verify:bulk`)

> POST a file (CSV, TSV, TXT or XLSX, up to 50 MB and 500,000 unique addresses) or a public HTTPS URL to /v1/verify/bulk/upload. Add preview=true to get a free list health estimate first, then confirm to charge 1 credit per unique address and start verification. Without preview, the job is charged and started as soon as the file has been read.

cURL:

```bash
curl -X POST https://api.rocketverifier.com/v1/verify/bulk/upload \
  -H "Authorization: Bearer $ROCKETVERIFIER_API_KEY" \
  -F "file=@leads.csv" \
  -F "name=October leads" \
  -F "email_column=Work Email" \
  -F "preview=true"
```

Node.js:

```js
import fs from "node:fs";
import RocketVerifier from "@rocketverifier/sdk";

const rv = new RocketVerifier(process.env.ROCKETVERIFIER_API_KEY);

const upload = await rv.batch.upload({
  file: fs.createReadStream("leads.csv"),
  filename: "leads.csv",
  name: "October leads",
  emailColumn: "Work Email",
  preview: true,
});
console.log(upload.jobId, upload.status); // "ingesting"
```

Python:

```python
import os
from rocketverifier import RocketVerifier

rv = RocketVerifier(os.environ["ROCKETVERIFIER_API_KEY"])

upload = rv.batch.upload(
    "leads.csv",
    name="October leads",
    email_column="Work Email",
    preview=True,
)
print(upload.job_id, upload.status)  # "ingesting"
```

Response 202:

```json
{
  "job_id": "Jx3nq0V8cW1sT5bYk2dHfA",
  "status": "ingesting",
  "preview": true,
  "status_url": "/v1/jobs/Jx3nq0V8cW1sT5bYk2dHfA",
  "progress_url": "/v1/jobs/Jx3nq0V8cW1sT5bYk2dHfA/progress"
}
```

File upload is the way to verify a spreadsheet or an export without parsing it yourself. RocketVerifier reads the file, finds the email column, removes duplicates and keeps your original columns for the download.

## Choose upload or JSON

Use file upload for files and exports, and [`POST /v1/verify/bulk`](https://docs.rocketverifier.com/api/batch) when your code already holds the addresses.

| | File upload | JSON bulk |
| --- | --- | --- |
| Endpoint | `POST /v1/verify/bulk/upload` | `POST /v1/verify/bulk` |
| Input | CSV, TSV, TXT or XLSX file, or an HTTPS URL | JSON array of addresses |
| Unique addresses per job | 500,000 | 100,000 |
| Free list health preview | Yes, with `preview=true` | No |
| Charged | When the file has been read, or at confirm | When the job is created |
| Original columns in the download | Yes | No |
| Sandbox keys | Not accepted | Accepted with sandbox addresses |

Both run the same verification, refund unknown results at completion and share every [job endpoint](https://docs.rocketverifier.com/api/batch#track-progress).

## Upload a file

Send `multipart/form-data` with the file in the `file` field. The response is `202` with the job id, and the job starts in `ingesting` while the file is read.

- `Authorization` (string, required):

`Bearer <API key or access token>` with the `verify:bulk` scope.

- `Content-Length` (integer, required):

Required for multipart uploads. cURL and the SDKs set it for you. Missing it returns `411 length_required`.

- `Idempotency-Key` (string):

Any unique string. Retrying with the same key within 24 hours returns the original job instead of a second upload.

- `file` (file, required):

The list: `.csv`, `.tsv`, `.txt` or `.xlsx`, up to 50 MB. Send exactly one of `file` and `source_url`.

- `name` (string):

Job name shown in the dashboard and on every job endpoint. Up to 200 characters.

- `email_column` (string):

Header name (case-insensitive) or 0-based index of the email column. Detected automatically when omitted.

- `column_mapping` (string):

JSON object such as `{"email": "Work Email"}`. Takes precedence over `email_column`.

- `preview` (boolean, default false):

`true` stops the job after a free list health preview, and nothing is charged until you [confirm](#confirm-and-start-the-job).

- `callback_url` (string):

Public HTTPS URL that receives a signed POST when the job completes or fails. See [callbacks](#get-a-callback-when-the-job-finishes).

## Import from a URL

Send `application/json` with `source_url` instead of a file. RocketVerifier downloads the file server side over HTTPS, with the same 50 MB and 500,000 address limits.

cURL:

```bash
curl -X POST https://api.rocketverifier.com/v1/verify/bulk/upload \
  -H "Authorization: Bearer $ROCKETVERIFIER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "source_url": "https://files.northwind.io/exports/leads.csv",
    "name": "October leads",
    "column_mapping": {"email": "Work Email"},
    "preview": true
  }'
```

**JSON body**

| Field | Type | Description |
| --- | --- | --- |
| `source_url` | string (uri) | Public HTTPS URL of the file, up to 2,048 characters. Fetched server side, 50 MB max. required |
| `name` | string | Job name shown in the dashboard. up to 200 characters |
| `column_mapping` | object | The email column, such as `{"email": "Work Email"}` or `{"email": 2}`. A bare header name also works. Detected automatically when omitted. |
| `email_column` | string | Header name or 0-based index of the email column. Used when `column_mapping` is not set. |
| `preview` | boolean | Stop after a free list health preview and wait for `/confirm`. default false |
| `callback_url` | string (uri) | Public HTTPS URL that receives a signed POST when the job completes or fails. |

The URL must be public HTTPS. Private, loopback and internal addresses are refused with `400 invalid_source_url`. In the SDKs, pass `sourceUrl` (Node.js) or `source_url` (Python) instead of a file.

## Pick the email column

When you do not name the column, RocketVerifier chooses it in this order:

1. A header that is exactly an email header, such as `Email`, `E-mail`, `Email Address` or `Mail`.
2. Any header that contains `email` or `e-mail`.
3. The column with the most email-shaped values in the first rows.

A file with no header row works too: the first row is treated as data when it contains an address. A `.txt` file with one address per line needs no header at all. Text files are read as UTF-8, with Latin-1 as the fallback, and the delimiter (comma, semicolon, tab or pipe) is detected automatically. Rows keep up to 200 columns, and every cell keeps up to 1,000 characters.

Duplicates within the file are removed case-insensitively before charging, and blank rows are skipped.

## Get the free list health preview

`POST /v1/verify/bulk/{jobId}/preview` returns an estimate of the list's quality before you spend a credit. Every row gets syntax, disposable, role, MX, duplicate and suppression checks, and a random sample of the rows that need SMTP (the smaller of 200 addresses and 2% of the list) gets a live SMTP probe. The sample's results are projected across the list.

`POST /v1/verify/bulk/{jobId}/preview`

cURL:

```bash
curl -X POST https://api.rocketverifier.com/v1/verify/bulk/Jx3nq0V8cW1sT5bYk2dHfA/preview \
  -H "Authorization: Bearer $ROCKETVERIFIER_API_KEY"
```

Node.js:

```js
let res = await rv.batch.preview(upload.jobId);
while (res.pending) {
  await new Promise((r) => setTimeout(r, 3000));
  res = await rv.batch.preview(upload.jobId);
}
console.log(res.preview.estimatedBounceRate, res.preview.creditsNeeded);
```

Python:

```python
import time

res = rv.batch.preview(upload.job_id)
while res.pending:
    time.sleep(3)
    res = rv.batch.preview(upload.job_id)
print(res.preview.estimated_bounce_rate, res.preview.credits_needed)
```

Response 200:

```json
{
  "job_id": "Jx3nq0V8cW1sT5bYk2dHfA",
  "status": "awaiting_confirmation",
  "preview": {
    "computed_at": "2026-11-11T10:31:12.004118+00:00",
    "total_emails": 48210,
    "duplicates_removed": 1372,
    "free_checks": {
      "syntax_invalid": 212,
      "no_mx": 388,
      "disposable": 640,
      "role_based": 1905,
      "suppressed": 57,
      "free_provider": 20114,
      "resolved_without_smtp": 1297,
      "needs_smtp": 46913
    },
    "smtp_sample": {
      "size": 200,
      "counts": { "valid": 171, "invalid": 14, "catch_all": 11, "unknown": 4 },
      "method": "random sample of SMTP-bound rows, min(200, 2%)"
    },
    "estimated_counts": { "valid": 40109, "invalid": 3918, "catch_all": 2580, "disposable": 640, "unknown": 963 },
    "estimated_by_status": { "deliverable": 40109, "undeliverable": 4558, "risky": 2580, "unknown": 963 },
    "estimated_bounce_rate": 0.0813,
    "undeliverable_share": 0.0945,
    "risky_share": 0.0,
    "unknown_share": 0.0735,
    "credits_needed": 48210,
    "estimated_credits_after_refunds": 47247,
    "confidence": "high"
  }
}
```

While the file is still being read, the call returns `202` with `preview: null`, and the SDKs report `pending`. Poll every few seconds. Add `?refresh=true` to recompute the preview of a job that is waiting for confirmation, for example after you update your suppression list.

| Field | Type | Description |
| --- | --- | --- |
| `computed_at` | string (date-time) | When the preview was computed. |
| `total_emails` | integer | Unique addresses after deduplication. |
| `duplicates_removed` | integer | Rows dropped as duplicates. Never charged. |
| `free_checks` | object | Counts from the checks run on every row, with no SMTP. |
| `free_checks.syntax_invalid` | integer | Addresses with invalid syntax. |
| `free_checks.no_mx` | integer | Addresses whose domain has no mail route. |
| `free_checks.disposable` | integer | Disposable inbox addresses. |
| `free_checks.role_based` | integer | Role addresses such as info@ or sales@. |
| `free_checks.suppressed` | integer | Addresses on your suppression lists. |
| `free_checks.free_provider` | integer | Addresses at free mailbox providers. |
| `free_checks.resolved_without_smtp` | integer | Rows decided without SMTP. |
| `free_checks.needs_smtp` | integer | Rows that need a live SMTP check. |
| `smtp_sample` | object | The live SMTP probe of a random sample of the rows that need SMTP. |
| `smtp_sample.size` | integer | Addresses probed, min(200, 2% of the list). |
| `smtp_sample.counts` | object | Outcomes by classification. |
| `smtp_sample.method` | string | How the sample was drawn. |
| `estimated_counts` | object | Estimated count per classification for the whole list. |
| `estimated_by_status` | object | Estimated count per status, with catch-all addresses counted as `risky`. |
| `estimated_by_status.deliverable` | integer |  |
| `estimated_by_status.undeliverable` | integer |  |
| `estimated_by_status.risky` | integer |  |
| `estimated_by_status.unknown` | integer |  |
| `estimated_bounce_rate` | number | Expected hard bounce share if the list were sent as is (0 to 1). |
| `undeliverable_share` | number | Expected invalid plus disposable share (0 to 1). |
| `risky_share` | number | Expected share classified risky, without catch-all (0 to 1). |
| `unknown_share` | number | Expected unknown plus catch-all share (0 to 1). |
| `credits_needed` | integer | Credits `/confirm` charges (1 per unique address). |
| `estimated_credits_after_refunds` | integer | Expected net cost once unknown results are refunded. |
| `confidence` | enum | `high` when no SMTP was needed or the sample has 100 or more addresses. one of `high`, `medium`, `low` |

## Confirm and start the job

`POST /v1/verify/bulk/{jobId}/confirm` charges 1 credit per unique address (`preview.credits_needed`) and queues the job. It is safe to retry: a job is never charged twice.

`POST /v1/verify/bulk/{jobId}/confirm`

cURL:

```bash
curl -X POST https://api.rocketverifier.com/v1/verify/bulk/Jx3nq0V8cW1sT5bYk2dHfA/confirm \
  -H "Authorization: Bearer $ROCKETVERIFIER_API_KEY"
```

Node.js:

```js
const started = await rv.batch.confirm(upload.jobId);
console.log(started.creditsCharged, started.creditsRemaining);
```

Python:

```python
started = rv.batch.confirm(upload.job_id)
print(started.credits_charged, started.credits_remaining)
```

Response 200:

```json
{
  "job_id": "Jx3nq0V8cW1sT5bYk2dHfA",
  "status": "pending",
  "credits_charged": 48210,
  "credits_remaining": 51790
}
```

From here the job behaves like any bulk job. Track it with [progress](https://docs.rocketverifier.com/api/batch#track-progress), and download results with [`include_original=true`](https://docs.rocketverifier.com/api/batch#download-results) to get your own columns back. To drop a previewed list instead, [cancel the job](https://docs.rocketverifier.com/api/batch#cancel-a-job): nothing was charged, so nothing is lost.

## Get a callback when the job finishes

Set `callback_url` and RocketVerifier POSTs a signed `job.completed` or `job.failed` event to that URL for this one job. The upload response then includes `callback_secret` (`whsec_...`), shown only once: store it to verify the signature.

Callbacks use the same envelope, headers, signature scheme and retry schedule as [webhooks](https://docs.rocketverifier.com/api/webhooks#verify-the-signature), signed with the job's `callback_secret`. For events on every job, register a webhook once instead.

## Follow the job lifecycle

An upload moves through these statuses. Every one of them is visible on [`GET /v1/jobs/{jobId}`](https://docs.rocketverifier.com/api/batch#get-job-status).

| Status | What is happening |
| --- | --- |
| `ingesting` | The file is being downloaded, parsed and deduplicated. Nothing is charged. |
| `awaiting_confirmation` | `preview=true` only. The preview is ready and the job waits for `/confirm`. Nothing is charged. |
| `pending` | Charged and queued. |
| `processing` | Verification is running. |
| `completed` | Done. Unknown results are refunded, and webhooks and callbacks fire. |
| `failed` | The file could not be used, or the job stopped. A `job.failed` event fires. |
| `cancelled` | You cancelled it. |

An upload fails while ingesting when the file cannot be read, has no email column, has no addresses, has more than 500,000 unique addresses, or the balance does not cover it once read. A failed upload is never charged.

## Errors

| Status | `error.code` | When it happens |
| --- | --- | --- |
| 400 | `missing_file` | Send exactly one of `file` and `source_url`. |
| 400 | `unsupported_file_type` | The file is not `.csv`, `.tsv`, `.txt` or `.xlsx`. |
| 400 | `empty_file` | The uploaded file has no bytes. |
| 400 | `invalid_column_mapping` | `column_mapping` is not valid JSON or not an object. |
| 400 | `invalid_source_url`, `invalid_callback_url` | The URL is not public HTTPS or is longer than 2,048 characters. |
| 400 | `invalid_json` | The JSON body is not a JSON object. |
| 401 | `unauthorized`, `api_key_expired` | The key is missing, invalid, revoked or expired. |
| 402 | `insufficient_credits` | No balance for a job without preview, or the balance does not cover the list at confirm. |
| 402 | `api_key_spend_cap_reached` | Confirming would pass this key's monthly spend cap. |
| 403 | `sandbox_key_restricted` | Sandbox keys cannot upload files. |
| 403 | `insufficient_credits`, `insufficient_scope` | The balance is zero, or the credential lacks `verify:bulk`. |
| 404 | `not_found` | No job with this id on your account. |
| 409 | `preview_unavailable` | The job was uploaded without `preview=true`. |
| 409 | `job_not_awaiting_confirmation` | The job is not waiting for confirmation. `details.status` says where it is. |
| 411 | `length_required` | The multipart request has no `Content-Length`. |
| 413 | `file_too_large` | The file is larger than 50 MB. |
| 415 | `unsupported_media_type` | Use `multipart/form-data` or `application/json`. |
| 502 | `storage_unavailable` | The file could not be stored. Retry the upload. |
| 503 | `maintenance`, `queue_unavailable` | Uploads are paused briefly. Retry shortly. |

Every error uses the [standard error shape](https://docs.rocketverifier.com/api#handle-errors).

## Frequently asked questions

### What is the largest file I can upload?

50 MB and 500,000 unique addresses per upload, in CSV, TSV, TXT or XLSX. The JSON endpoint POST /v1/verify/bulk takes up to 100,000 addresses per request.

### Does the list health preview cost credits?

No. The preview runs syntax, disposable, role, MX, duplicate and suppression checks on every row, plus a live SMTP probe of a random sample, and charges nothing. You pay only when you confirm.

### How does RocketVerifier find the email column?

It picks the column whose header looks like an email header, then any header containing "email", then the column with the most email-shaped values. Set email_column or column_mapping to choose it yourself.

### Can I keep my own columns in the results?

Yes. Download with include_original=true and every row starts with your file's original columns, followed by the verification results.

### Can I upload with a sandbox key?

No. Sandbox keys cannot upload files. Test bulk flows with POST /v1/verify/bulk and @sandbox.rocketverifier.com addresses instead.
