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

# Configure access

> An explicit host, a private key and no default customer.

> [!NOTE]
>
> The examples use the canonical app host. Production API access is currently disabled. Configure the enabled host issued with your key; see [API availability](https://docs.emailx.ai/en/api-reference/introduction.md).

Create an expiring key in Emailx under [Settings > API keys](https://docs.emailx.ai/en/overview/authentication.md#create-a-key). Load it through exactly one of `EMAILX_API_KEY` or `EMAILX_API_KEY_FILE`. Prefer the file form for local use.

```bash theme={null}
export EMAILX_BASE_URL="https://app.emailx.ai"
export EMAILX_API_KEY_FILE="/absolute/private/path/emailx-key"
emailx doctor --json
emailx auth status --json
emailx workspaces list --limit 25 --json
```

Populate the file with your secret manager or editor. It must contain only the key, be owned by the current user, have mode `0600` and not be a symlink. Never pass a key as a command argument or commit it.

## Multiple clients

There is no implicit active client or saved profile switch. Select the workspace explicitly on each resource command. Agency calls need `agency:read`, resource scope and current membership. Rediscover access before working with a client that may have been reassigned.

## Transport behavior

HTTPS is required except explicit loopback development. The client does not load `.env`, follow redirects or use ambient HTTP proxy variables. It connects only to the configured API, never directly to provider credentials or the database.

Rotate and revoke keys in Emailx under Settings > API keys. The same live role rules apply to CLI, MCP and direct REST calls.


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