# RocketVerifier CLI

Source: https://docs.rocketverifier.com/sdks/cli

> Run npx @rocketverifier/cli verify followed by an address, or install it globally with npm install -g @rocketverifier/cli. Authenticate with --api-key, ROCKETVERIFIER_API_KEY or rocketverifier config set-key. Every command prints readable text or, with --json, the raw API response, and exits non-zero on any error. verify-batch checks up to 100 addresses in one call and find looks up a work address.

`@rocketverifier/cli` brings the RocketVerifier API to your terminal. Verify one address or up to 100 in one call, find a work address, run a bulk job from a list or a file with a free list health preview, follow its progress, download the results and check your balance, all without writing code. It is built for scripts and CI pipelines: plain text for people, `--json` for machines and a non-zero exit code on every error.

## Install the CLI

Run it on demand with `npx`, or install it globally for the `rocketverifier` command.

CLI:

```bash
npx @rocketverifier/cli verify deliverable@sandbox.rocketverifier.com   # no install
npm install -g @rocketverifier/cli                                      # then: rocketverifier ...
rocketverifier --version
```

## Authenticate

The CLI needs an API key. It reads the key from the first of these that is set.

1. The `-k, --api-key <key>` flag on the command.
2. The `ROCKETVERIFIER_API_KEY` environment variable.
3. The key saved with `rocketverifier config set-key`, in `~/.rocketverifier/config.json`.

CLI:

```bash
rocketverifier config set-key rv_live_your_key_here
rocketverifier verify maya@northwind.io

export ROCKETVERIFIER_API_KEY="rv_live_your_key_here"
rocketverifier credits

rocketverifier verify maya@northwind.io --api-key rv_test_your_sandbox_key
```

Live keys start with `rv_live_`; sandbox keys start with `rv_test_`, accept only [sandbox addresses](https://docs.rocketverifier.com/sandbox) and work with an empty balance. Without a key, every API command prints an error and exits with code 1. See [authentication](https://docs.rocketverifier.com/authentication) for creating keys.

Every request sends `RocketVerifier-Version: 2026-11-01`, the API version the CLI is built against, so catch-all addresses come back with status `risky`. See [result versions](https://docs.rocketverifier.com/versioning).

### Set the API base URL

The base URL defaults to `https://api.rocketverifier.com`. Override it in the same order: the `-u, --base-url <url>` flag, then `ROCKETVERIFIER_BASE_URL`, then the saved config.

CLI:

```bash
rocketverifier config set-base-url https://api.rocketverifier.com
ROCKETVERIFIER_BASE_URL=https://api.rocketverifier.com rocketverifier credits
rocketverifier credits --base-url https://api.rocketverifier.com
rocketverifier config show   # resolved key (redacted), base URL and config file path
```

## Global options

These options work with every command. Put them before or after the command.

| Option | What it does |
| --- | --- |
| `-k, --api-key <key>` | API key for this run. Overrides the environment variable and the saved key. |
| `-u, --base-url <url>` | API base URL for this run. |
| `--json` | Print the raw API JSON instead of formatted text. |
| `-v, --version` | Print the CLI version. |
| `-h, --help` | Help for the CLI or for any command. |

## Verify an email

`rocketverifier verify <email>` checks one address in real time with [`POST /v1/verify`](https://docs.rocketverifier.com/api/verify).

CLI:

```bash
rocketverifier verify deliverable@sandbox.rocketverifier.com
```

The text output starts with the address and its status, followed by labelled lines for `sub-status`, `reason`, `score`, `disposable`, `free`, `accept-all`, `catch-all`, `role`, `provider`, `did you mean` and `verified at` whenever the API returns them. Add `--json` for the full result, where flags such as `domain.disposable` are the strings `"yes"` and `"no"`.

CLI:

```bash
rocketverifier verify maya@northwind.io --json | jq -r '.status'
rocketverifier verify maya@northwind.io --json | jq -r '.domain.disposable'   # "yes" or "no"
```

The [reading results guide](https://docs.rocketverifier.com/results) explains every status and `sub_status`.

## Verify up to 100 addresses in one call

`rocketverifier verify-batch [emails...]` verifies 1 to 100 addresses with [`POST /v1/verify/batch`](https://docs.rocketverifier.com/api/verify-batch) and prints every result at once, so there is no job to follow. Pass addresses as arguments, with `--file`, or both.

CLI:

```bash
rocketverifier verify-batch deliverable@sandbox.rocketverifier.com undeliverable@sandbox.rocketverifier.com
rocketverifier verify-batch --file signups.csv --timeout 20
rocketverifier verify-batch --file signups.csv --json | jq -r '.results[] | select(.status == "deliverable") | .email'
```

| Option | What it does |
| --- | --- |
| `-f, --file <path>` | A text or CSV file. The CLI splits it on new lines and commas and keeps every value containing `@`. |
| `-t, --timeout <seconds>` | Time limit for the whole call, a whole number from 3 to 60 (default 30). An address whose mail server has not answered by then comes back `unknown`. |

- The text output is a table of `email`, `status`, `sub_status`, `score` and `duplicate`, in input order, followed by the result count, the credits charged and your remaining balance. `--json` prints the full API response, with one complete result per address.
- Each address with a real answer costs 1 credit. `unknown` results and repeated addresses (`duplicate: true`) are free.
- More than 100 addresses stops with `too_many_emails` before anything is sent. Use `bulk create` for longer lists.

## Find an email address

`rocketverifier find <domain>` finds a person's work address from their name and company domain with [`POST /v1/finder`](https://docs.rocketverifier.com/api/finder). Pass `--first-name` (with `--last-name` when you have it) or `--full-name`.

CLI:

```bash
rocketverifier find northwind.io --first-name Maya --last-name Patel
rocketverifier find northwind.io --full-name "Maya Patel" --json | jq -r '.email'
```

The text output shows the address (or `no address found`) with its status, then `confidence`, `pattern`, `sub-status`, any `alternative` addresses with their confidence and the `credits` charged. Each candidate check with a definite answer costs 1 credit, at most 4 per search.

## Run a bulk job

`rocketverifier bulk create` starts a job of up to 100,000 unique addresses from arguments, a file, or both. See the [batch API](https://docs.rocketverifier.com/api/batch).

CLI:

```bash
rocketverifier bulk create maya@northwind.io deliverable@sandbox.rocketverifier.com --name "Launch list"
rocketverifier bulk create --file leads.csv --name "Q3 leads"
rocketverifier bulk create --file leads.csv --wait
```

| Option | What it does |
| --- | --- |
| `-f, --file <path>` | A text or CSV file. The CLI splits it on new lines and commas and keeps every value containing `@`. |
| `-n, --name <name>` | Job name. |
| `-w, --wait` | Poll every 3 seconds until the job ends (up to 30 minutes). With `--json`, prints every result once the job completes. |

The CLI counts unique addresses before sending and stops with `too_many_emails` above 100,000. Without `--wait`, it prints the job ID and the credits reserved.

### Check status and progress

CLI:

```bash
rocketverifier bulk status job_abc123       # status, processed/total and counts
rocketverifier jobs progress job_abc123     # counts by status, rate per minute and ETA
```

### Read and download results

`bulk results` prints one page of results as a table; `bulk download` writes the full results file.

CLI:

```bash
rocketverifier bulk results job_abc123 --filter deliverable --limit 1000 --page 2
rocketverifier bulk results job_abc123 --json | jq -r '.results[] | [.email, .status, .ref] | @tsv'
rocketverifier bulk download job_abc123 --output results.csv
rocketverifier bulk download job_abc123 --filter send_safe --output safe.csv
rocketverifier bulk download job_abc123 --include-original --output joined.csv
rocketverifier bulk download job_abc123 --format json > results.json
```

| Command | Options |
| --- | --- |
| `bulk results <jobId>` | `-p, --page <n>` (default 1), `-l, --limit <n>` (default 100, up to 1000), `--filter <value>` (`deliverable`, `undeliverable`, `risky`, `unknown` or `send_safe`), `-c, --classification <value>` (`valid`, `invalid`, `risky`, `catch_all`, `disposable` or `unknown`) |
| `bulk download <jobId>` | `-o, --output <path>` (default stdout), `--format <csv\|json>` (default `csv`), `--filter <value>` (`deliverable`, `undeliverable`, `risky`, `unknown` or `send_safe`), `--include-original` |

`send_safe` keeps deliverable plus high-scoring catch-all addresses. `--include-original` joins upload jobs with your file's own columns, followed by the `rv_` result columns. With `--json`, `bulk results` prints each row's full verification result plus `ref` and `duplicate`; a repeated address follows its first row with `duplicate: true`.

## Upload a file with a free preview

`rocketverifier bulk upload <file>` creates a job from a CSV, TSV, TXT or XLSX file of up to 50 MB, or from a public `https://` URL. With `--preview`, the job stops with a free list health estimate and starts only when you confirm it. See [bulk upload](https://docs.rocketverifier.com/api/bulk-upload).

CLI:

```bash
rocketverifier bulk upload contacts.xlsx --email-column "Work Email" --preview --wait
rocketverifier bulk confirm job_abc123
rocketverifier jobs progress job_abc123

rocketverifier bulk upload https://northwind.io/exports/leads.csv --name "Leads"
```

| Option | What it does |
| --- | --- |
| `-n, --name <name>` | Job name. |
| `-e, --email-column <column>` | Header name or 0-based index of the email column. |
| `--column-mapping <json>` | A JSON object such as `'{"email":"Work Email"}'`. Overrides `--email-column`. |
| `--preview` | Stop for a free list health preview. Start the job with `bulk confirm`. |
| `--callback-url <url>` | HTTPS URL that receives a signed POST when the job finishes. The callback secret is printed once. |
| `-w, --wait` | Wait for the preview with `--preview`, or for the job to finish without it. |

The preview shows the estimated bounce rate, the share of undeliverable, risky and unknown addresses, the credits needed and a confidence level.

CLI:

```bash
rocketverifier bulk preview job_abc123 --wait      # wait until the preview is ready
rocketverifier bulk preview job_abc123 --refresh   # recompute it
rocketverifier bulk confirm job_abc123             # charge and start; never charged twice
```

## Manage jobs

CLI:

```bash
rocketverifier jobs list --status completed --limit 50
rocketverifier jobs cancel job_abc123
```

- `jobs list` takes `-p, --page <n>` (default 1), `-l, --limit <n>` (default 20, up to 100) and `-s, --status <status>`: `ingesting`, `awaiting_confirmation`, `pending`, `processing`, `completed`, `failed` or `cancelled`.
- `jobs cancel <jobId>` cancels a pending or running job and prints how many credits for unprocessed addresses went back to your balance.
- `jobs progress <jobId>` shows live counts, throughput and ETA.

## Check credits

CLI:

```bash
rocketverifier credits
rocketverifier credits --json | jq '.credits'
```

## Command reference

| Command | What it does |
| --- | --- |
| `verify <email>` | Verify one address in real time. |
| `verify-batch [emails...]` | Verify up to 100 addresses in one call. |
| `find <domain>` | Find a person's work address from a name and a domain. |
| `bulk create [emails...]` | Create a bulk job from arguments or `--file`. |
| `bulk upload <file>` | Create a job from a file or an `https://` URL. |
| `bulk preview <jobId>` | Show the free preview of an upload created with `--preview`. |
| `bulk confirm <jobId>` | Charge and start a previewed job. |
| `bulk status <jobId>` | Show a job's status and counts. |
| `bulk results <jobId>` | Print one page of results. |
| `bulk download <jobId>` | Download the full results as CSV or JSON. |
| `jobs list` | List recent jobs. |
| `jobs progress <jobId>` | Show counts, rate and ETA. |
| `jobs cancel <jobId>` | Cancel a job; credits for unprocessed addresses go back to your balance. |
| `credits` | Show your credit balance. |
| `config set-key <apiKey>` | Save your API key. |
| `config set-base-url <baseUrl>` | Save an API base URL. |
| `config show` | Print the resolved configuration with the key redacted. |

## Output formats

The CLI prints readable text by default and the raw API response with `--json`.

- **Text:** tables and labelled lines, colored when stdout is a terminal. Set `NO_COLOR` to turn colors off.
- **JSON:** `--json` prints the API response as indented JSON on stdout, with the API's snake_case field names. API errors print `{"error": {"code", "message", "details"}}` on stdout instead of text.
- **Streams:** results go to stdout; spinners, progress lines and errors go to stderr, so piping stays clean.
- **Downloads:** `bulk download` writes the file body exactly as the API returns it, to `--output` or stdout.

## Exit codes

The exit code tells you whether the command worked, so a pipeline stops on any failure.

| Code | When |
| --- | --- |
| `0` | The command succeeded, whatever the verification verdict. |
| `1` | Any error: no API key, an invalid option value, an API error (for example `insufficient_credits` or `rate_limited`), a timeout or a network failure. |

To fail a pipeline on the verdict itself, test the JSON with `jq -e`, which exits non-zero when the expression is false.

CLI:

```bash
rocketverifier verify "$EMAIL" --json | jq -e '.status == "deliverable"' > /dev/null
```

## Retries and timeouts

The CLI retries a 429 response up to 2 times when the API sends a `Retry-After` header, waiting for that many seconds (at most 30). Requests time out after 30 seconds, `verify-batch` gets its `--timeout` plus 15 seconds (45 seconds by default), and file uploads get 5 minutes. Every POST carries an `Idempotency-Key` reused across retries, so a retried call never charges twice. See [rate limits](https://docs.rocketverifier.com/rate-limits).

## Use the CLI in CI

Use a sandbox key in CI so tests run for free and never touch real addresses. Store the key as a secret and expose it as `ROCKETVERIFIER_API_KEY`.

GitHub Actions:

```yaml
name: Email verification smoke test
on: [push]

jobs:
  verify:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - name: Verify a sandbox address
        env:
          ROCKETVERIFIER_API_KEY: ${{ secrets.ROCKETVERIFIER_TEST_KEY }}
        run: |
          npx @rocketverifier/cli verify deliverable@sandbox.rocketverifier.com --json \
            | jq -e '.status == "deliverable"'
          npx @rocketverifier/cli verify undeliverable@sandbox.rocketverifier.com --json \
            | jq -e '.status == "undeliverable"'
```

For a nightly list clean, upload the export, wait for it and keep only safe addresses.

CLI:

```bash
JOB=$(rocketverifier bulk upload export.csv --wait --json | jq -r '.job_id')
rocketverifier bulk download "$JOB" --filter send_safe --output clean.csv
```

## Next steps

- [Sandbox and testing](https://docs.rocketverifier.com/sandbox)
A fixed result for every sub_status, free in tests and CI.
- [All SDKs](https://docs.rocketverifier.com/sdks)
Libraries for Node.js, Python, Go, PHP and Ruby.

## Frequently asked questions

### Does an undeliverable result fail the command?

No. The exit code reports whether the call succeeded, not the verdict. Gate a pipeline on the result with `--json` and `jq -e`, for example `jq -e '.status == "deliverable"'`.

### Which API key wins when several are set?

`--api-key` first, then the `ROCKETVERIFIER_API_KEY` environment variable, then the key saved with `config set-key`.

### Can I run the CLI in CI without spending credits?

Yes. Use a sandbox key (`rv_test_`) and sandbox addresses such as `deliverable@sandbox.rocketverifier.com`. They return fixed results for free.

### Which API version does the CLI use?

Every request sends `RocketVerifier-Version: 2026-11-01`, so catch-all addresses come back as `risky`. See [result versions](/versioning).

### Where does the CLI store my key?

In `~/.rocketverifier/config.json`, created with file mode 600 inside a directory with mode 700.
