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

# API key commands

> Manage Olira API keys from the terminal: olira keys create, list, and revoke.

Manage API keys (organization admin only).

## `olira keys create`

Create a new API key.

| Flag       | Description                                                                                                                                                                                                                               |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--name`   | Key name (skips the interactive prompt).                                                                                                                                                                                                  |
| `--scopes` | Scopes to grant (space-separated). Skips the interactive picker. Valid: `mcp:patient-state`, `mcp:integration`, `sdk:event-log`, `sdk:patient-token`, `api:manage-patients`, `api:org-config`, `sdk:state-read`, `sdk:historical-ingest`. |

Use `olira keys create --scopes …` for non-interactive creation, or omit
`--scopes` for the interactive picker. See [Scopes](/cli/scopes) for what each
scope grants.

## `olira keys list`

List API keys for your organization.

## `olira keys revoke`

Permanently revoke an API key.

| Flag  | Description              |
| ----- | ------------------------ |
| `key` | Key name or ID to revoke |
