---
title: "CLI: Inboxes"
description: "The commands of the doorman command line under Inboxes. Addresses on the inbox domain: issue, read, rename and delete them."
url: https://doorman.fyi/docs/cli/commands/inboxes
markdown: https://doorman.fyi/docs/cli/commands/inboxes.md
area: "SDKs and tools"
section: "Command line"
---

# CLI: Inboxes

The commands of the doorman command line under Inboxes. Addresses on the inbox domain: issue, read, rename and delete them.

Source: https://doorman.fyi/docs/cli/commands/inboxes

## doorman inboxes list

Command:
```sh
doorman inboxes list [flags]
```

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

List inboxes. Access `any`: any API key, or a console session. An app token needs `inboxes:read`.

**Flags**

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--q` | `string` | no | Keep the inboxes whose address or display name contains this text, case-insensitively. |
| `--external-id` | `string` | no | Keep the inbox with exactly this `externalId`: at most one, since it is unique among the account's active inboxes. |
| `--limit` | `integer` | no | Page size, 1 to 100. Defaults to 50. |
| `--offset` | `integer` | no | Rows to skip. Defaults to 0. |

## doorman inboxes create

Command:
```sh
doorman inboxes create [flags]
```

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

Issue an inbox. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. An app token needs `inboxes:write`.

**Flags**

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--mailbox-name` | `string` | no | 3 to 30 lowercase letters, digits, dots or hyphens: the part before the @. Reserved names are refused with 400 validation_error: mail infrastructure (abuse, admin, administrator, api, bounce, bounces, ...), the company's role accounts (support, billing, sales, legal, security, ...), names holding such a role as a dot- or hyphen-separated label (acme-support) however the role is written (support1, supp0rt, no-reply, supportteam), and the doorman and theovex brand with its lookalikes. The full lists are under x-doorman-limits.inboxes. |
| `--display-name` | `string` | no | The sender name on outbound mail, at most 100 characters, with at least one letter or digit and no @, <, >, URL, control or invisible characters, no Latin mixed with Cyrillic or Greek, never the doorman or theovex brand, and never a bare role such as Support or Billing team: it says who, not only what. |
| `--external-id` | `string` | no | Your own identifier for the inbox (a user, a job, a tenant), at most 200 characters and unique among the account's active inboxes. Look an inbox up with `GET /v1/inboxes?externalId=`. |
| `--metadata` | `object of string \| number \| boolean \| null` | no | Extension state: at most 20 keys and 2048 bytes of UTF-8 JSON. Keys are 1 to 64 ASCII letters, digits, underscores, dots, colons or hyphens, starting with a letter or digit. Values are strings, finite numbers, booleans or null. Replaced as a whole; {} clears it. Do not store secrets. |
| `--domain-id` | `string` | no | One of this account's verified custom domains. Omit for the shared domain. |
| `--webhook-url` | `string` | no | Set the inbox webhook at once: an https URL without credentials. The signing secret is in the answer's `webhook`. |
| `--key` | `object` | no | Mint an inbox-scoped key at once. Its token is in the answer's `key`. |
| `--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 create \
  --mailbox-name concierge \
  --display-name 'Acme concierge'
```

## doorman inboxes get

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

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

Read an inbox. Access `any`: any API key, or a console session. An app token needs `inboxes:read`.

**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 get inb_01jc4q7w9k2m5n8p3r6t1v4x7z
```

## doorman inboxes update

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

Operation [`inboxes.update`](https://doorman.fyi/docs/reference/inboxes.md#inboxes-update): `PATCH /v1/inboxes/{inboxId}`

Update an inbox. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. An app token needs `inboxes:write`.

**Flags**

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--inbox-id` | `string` | no | The same as the argument `<inboxId>`, for a script that names everything. |
| `--display-name` | `string \| null` | no | The new sender name; null or empty clears it. |
| `--signature` | `string \| null` | no | The new signature: plain text of at most 1000 characters, line breaks kept. It is appended to every message the inbox sends from then on, a rule's forward excepted. On the shared domain a signature may not present the sender as the company (the doorman or theovex brand beside a word such as team, support or security): that answers 400 validation_error, for this field and for `signatureHtml`. Null or empty clears it. |
| `--signature-html` | `string \| null` | no | The signature as markup, at most 10000 characters: tables, inline styles, links and https images, as a signature builder exports it. It is cleaned before it is stored (scripts, style sheets, forms, frames, event handlers, and images that are not https are removed), and the answer carries what was kept. From then on every message the inbox sends carries it in its HTML part, and a message sent as text alone gains an HTML part for it; `signature` stays the text part's. When it is set on an inbox that has no `signature`, and none is given with it, the text is read from the markup. Null or empty clears it. |
| `--external-id` | `string \| null` | no | Your new identifier for the inbox; null clears it. |
| `--metadata` | `object of string \| number \| boolean \| null` | no | Extension state: at most 20 keys and 2048 bytes of UTF-8 JSON. Keys are 1 to 64 ASCII letters, digits, underscores, dots, colons or hyphens, starting with a letter or digit. Values are strings, finite numbers, booleans or null. Replaced as a whole; {} clears it. Do not store secrets. |
| `--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 update inb_01jc4q7w9k2m5n8p3r6t1v4x7z \
  --display-name 'Acme concierge'
```

## doorman inboxes delete

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

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

Delete an inbox. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. An app token needs `inboxes:write`.

**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 delete inb_01jc4q7w9k2m5n8p3r6t1v4x7z
```

## doorman inboxes rules list

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

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

List inbound rules. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. An app token needs `rules:manage` and `mail:read` and `mail:write` and `mail:send`.

**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 rules list inb_01jc4q7w9k2m5n8p3r6t1v4x7z
```

## doorman inboxes rules create

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

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

Create an inbound rule. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. An app token needs `rules:manage` and `mail:read` and `mail:write` and `mail:send`.

**Flags**

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--inbox-id` | `string` | no | The same as the argument `<inboxId>`, for a script that names everything. |
| `--name` | `string` | yes |  |
| `--enabled` | `boolean` | no |  |
| `--when` | `object` | yes | All supplied conditions must match. At least one condition is required. |
| `--then` | `(object \| object \| object \| object)[]` | yes | Executed in array order. At most one auto_reply or forward action per rule. |
| `--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 rules create inb_01jc4q7w9k2m5n8p3r6t1v4x7z \
  --name 'Invoice triage' \
  --when '{"category":"personal","subjectContains":"invoice"}' \
  --then '[{"type":"label","label":"billing"}]'
```

## doorman inboxes rules get

Command:
```sh
doorman inboxes rules get <inboxId> <ruleId> [flags]
```

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

Read an inbound rule. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. An app token needs `rules:manage` and `mail:read` and `mail:write` and `mail:send`.

**Flags**

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

Example:
```sh
doorman inboxes rules get inb_01jc4q7w9k2m5n8p3r6t1v4x7z rul_01jc5f1a2b3c4d5e6f7g8h9j0k
```

## doorman inboxes rules update

Command:
```sh
doorman inboxes rules update <inboxId> <ruleId> [flags]
```

Operation [`inboxes.rules.update`](https://doorman.fyi/docs/reference/inboxes.md#inboxes-rules-update): `PATCH /v1/inboxes/{inboxId}/rules/{ruleId}`

Update an inbound rule. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. An app token needs `rules:manage` and `mail:read` and `mail:write` and `mail:send`.

**Flags**

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--inbox-id` | `string` | no | The same as the argument `<inboxId>`, for a script that names everything. |
| `--rule-id` | `string` | no | The same as the argument `<ruleId>`, for a script that names everything. |
| `--name` | `string` | no |  |
| `--enabled` | `boolean` | no |  |
| `--when` | `object` | no | All supplied conditions must match. At least one condition is required. |
| `--then` | `(object \| object \| object \| object)[]` | no | Executed in array order. At most one auto_reply or forward action per rule. |
| `--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 rules update inb_01jc4q7w9k2m5n8p3r6t1v4x7z rul_01jc5f1a2b3c4d5e6f7g8h9j0k \
  --enabled false
```

## doorman inboxes rules delete

Command:
```sh
doorman inboxes rules delete <inboxId> <ruleId> [flags]
```

Operation [`inboxes.rules.delete`](https://doorman.fyi/docs/reference/inboxes.md#inboxes-rules-delete): `DELETE /v1/inboxes/{inboxId}/rules/{ruleId}`

Delete an inbound rule. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. An app token needs `rules:manage` and `mail:read` and `mail:write` and `mail:send`.

**Flags**

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

Example:
```sh
doorman inboxes rules delete inb_01jc4q7w9k2m5n8p3r6t1v4x7z rul_01jc5f1a2b3c4d5e6f7g8h9j0k
```

## doorman inboxes rules runs

Command:
```sh
doorman inboxes rules runs <inboxId> <ruleId> [flags]
```

Operation [`inboxes.rules.runs`](https://doorman.fyi/docs/reference/inboxes.md#inboxes-rules-runs): `GET /v1/inboxes/{inboxId}/rules/{ruleId}/runs`

List rule executions. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. An app token needs `rules:manage` and `mail:read` and `mail:write` and `mail:send`.

**Flags**

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--inbox-id` | `string` | no | The same as the argument `<inboxId>`, for a script that names everything. |
| `--rule-id` | `string` | no | The same as the argument `<ruleId>`, for a script that names everything. |
| `--limit` | `integer` | no | Page size, 1 to 100. Defaults to 50. |
| `--offset` | `integer` | no | Rows to skip. Defaults to 0. |

Example:
```sh
doorman inboxes rules runs inb_01jc4q7w9k2m5n8p3r6t1v4x7z rul_01jc5f1a2b3c4d5e6f7g8h9j0k
```
