> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reachboost.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Output and scripting

> Status and errors go to stderr, so stdout is only data: a table by default, JSON or CSV when you ask, and exit codes a script can branch on.

## Tables and columns

Reads print a table of the most useful columns. `--columns` picks your own; `--all` fetches every page of a list, up to 200 pages of 100.

```bash theme={null}
reachboost leads list --all --columns first_name,last_name,company_name
```

## JSON

JSON, exactly as the API returned it:

```bash theme={null}
reachboost stats --start-date 2026-01-01 --end-date 2026-01-31 --json
```

> [!NOTE]
>
> With `--all`, the CLI fetches every page and prints one document instead of the API's own page: `{"data": [...], "total_count": ..., "pages_fetched": ..., "all_pages": true}`.

In CI, set `REACHBOOST_API_KEY` from your secret store and name the workspace explicitly:

```bash theme={null}
export REACHBOOST_WORKSPACE="<workspace-uuid>"
reachboost campaigns list --json
```

## CSV

CSV for a spreadsheet, every page at once:

```bash theme={null}
reachboost lead-lists leads "<lead-list-uuid>" --all --csv > leads.csv
```

> [!NOTE]
>
> CSV is RFC 4180. A cell that starts with a formula character is prefixed with an apostrophe so a spreadsheet shows it rather than runs it; set `REACHBOOST_CSV_RAW=1` to keep such cells exactly as the API sent them.

## Exit codes

Fixed for life, so scripts can branch on them.

| Code | Meaning |
| :-: | - |
| `0` | Success |
| `1` | Refused: by the API, or by the CLI for a command that is not in this release |
| `2` | Usage error, including a missing `--yes` |
| `3` | Authentication failed or missing |
| `4` | Rate limited. The `Retry-After` value is printed on stderr |
| `5` | Network failure, server error or a response of an unexpected shape |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.