---
title: "CLI: API keys"
description: "The commands of the doorman command line under API keys. Credentials for agents: account-wide keys from the console, inbox-scoped keys from the API."
url: https://doorman.fyi/docs/cli/commands/api-keys
markdown: https://doorman.fyi/docs/cli/commands/api-keys.md
area: "SDKs and tools"
section: "Command line"
---

# CLI: API keys

The commands of the doorman command line under API keys. Credentials for agents: account-wide keys from the console, inbox-scoped keys from the API.

Source: https://doorman.fyi/docs/cli/commands/api-keys

## doorman inboxes keys create

Command:
```sh
doorman inboxes keys create <inboxId> [flags]
```

Operation [`inboxes.keys.create`](https://doorman.fyi/docs/reference/api-keys.md#inboxes-keys-create): `POST /v1/inboxes/{inboxId}/api-keys`

Create an inbox key. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. App tokens are refused.

**Flags**

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--inbox-id` | `string` | no | The same as the argument `<inboxId>`, for a script that names everything. |
| `--name` | `string` | no | A label, at most 100 characters. |
| `--json` | `object` | no | The request body as one JSON object. A flag given beside it replaces the field of the same name. |

Example:
```sh
doorman inboxes keys create inb_01jc4q7w9k2m5n8p3r6t1v4x7z \
  --name Orchestrator
```

## doorman inboxes keys list

Command:
```sh
doorman inboxes keys list <inboxId> [flags]
```

Operation [`inboxes.keys.list`](https://doorman.fyi/docs/reference/api-keys.md#inboxes-keys-list): `GET /v1/inboxes/{inboxId}/api-keys`

List an inbox's keys. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. App tokens are refused.

**Flags**

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--inbox-id` | `string` | no | The same as the argument `<inboxId>`, for a script that names everything. |

Example:
```sh
doorman inboxes keys list inb_01jc4q7w9k2m5n8p3r6t1v4x7z
```

## doorman inboxes keys get

Command:
```sh
doorman inboxes keys get <inboxId> <keyId> [flags]
```

Operation [`inboxes.keys.get`](https://doorman.fyi/docs/reference/api-keys.md#inboxes-keys-get): `GET /v1/inboxes/{inboxId}/api-keys/{keyId}`

Read an inbox key. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. App tokens are refused.

**Flags**

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--inbox-id` | `string` | no | The same as the argument `<inboxId>`, for a script that names everything. |
| `--key-id` | `string` | no | The same as the argument `<keyId>`, for a script that names everything. |

Example:
```sh
doorman inboxes keys get inb_01jc4q7w9k2m5n8p3r6t1v4x7z key_01jc5c0z9y8x7w6v5t4t3s2r1q
```

## doorman inboxes keys revoke

Command:
```sh
doorman inboxes keys revoke <inboxId> <keyId> [flags]
```

Operation [`inboxes.keys.revoke`](https://doorman.fyi/docs/reference/api-keys.md#inboxes-keys-revoke): `DELETE /v1/inboxes/{inboxId}/api-keys/{keyId}`

Revoke an inbox key. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. App tokens are refused.

**Flags**

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--inbox-id` | `string` | no | The same as the argument `<inboxId>`, for a script that names everything. |
| `--key-id` | `string` | no | The same as the argument `<keyId>`, for a script that names everything. |

Example:
```sh
doorman inboxes keys revoke inb_01jc4q7w9k2m5n8p3r6t1v4x7z key_01jc5c0z9y8x7w6v5t4t3s2r1q
```
