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

# doctor

> Self-test the CLI: config file, API keys, live API reachability.

`jetemail doctor` runs four checks and prints a small report. Useful as a first step when anything looks off.

```sh theme={null}
jetemail doctor
```

```
jetemail doctor
════════════════
  ✓  config file          /Users/you/Library/Application Support/com.JetEmail.jetemail/config.toml
  ✓  api key              api_xxxx…wxyz (config)
  ✓  transactional key    transactional_xxxx…wxyz (config)
  ✓  api reachable        GET /outbound/domains → 2xx

✓ everything looks good.
```

## What it checks

| Check                 | What pass means                                                              |
| --------------------- | ---------------------------------------------------------------------------- |
| **config file**       | The config file path resolves. (Always passes.)                              |
| **api key**           | An `api_…` key was found in flag, env, or config.                            |
| **transactional key** | A `transactional_…` key was found. Informational only, doesn't fail the run. |
| **api reachable**     | `GET /outbound/domains` returns 2xx with the active key.                     |

## Exit code

* `0` when every required check passes.
* `1` when the API key is missing or the API call fails.

This makes it convenient as a CI pre-flight:

```sh theme={null}
jetemail doctor && deploy-step
```

## Related

* [Authentication](/cli/authentication)
* [Configuration](/cli/configuration)
* [Exit codes](/cli/exit-codes)
