---
title: "TypeScript SDK: Inboxes"
description: "The methods of the TypeScript client under Inboxes. Addresses on the inbox domain: issue, read, rename and delete them."
url: https://doorman.fyi/docs/sdk/reference/inboxes
markdown: https://doorman.fyi/docs/sdk/reference/inboxes.md
area: "SDKs and tools"
section: "TypeScript SDK"
---

# TypeScript SDK: Inboxes

The methods of the TypeScript client under Inboxes. Addresses on the inbox domain: issue, read, rename and delete them.

Source: https://doorman.fyi/docs/sdk/reference/inboxes

## client.inboxes.list

TypeScript:
```ts
client.inboxes.list(params: ListInboxesParams = {}): Promise<InboxPage>
```

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

The account's active inboxes, oldest first. An inbox-scoped key sees its own inbox only.

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

## client.inboxes.iterate

TypeScript:
```ts
client.inboxes.iterate(params: ListInboxesParams = {}): AsyncGenerator<InboxListItem, void, undefined>
```

Every inbox of the account, page by page.

## client.inboxes.findByExternalId

TypeScript:
```ts
client.inboxes.findByExternalId(externalId: string): Promise<InboxListItem | null>
```

The inbox tagged with this `externalId`, or null.

## client.inboxes.create

TypeScript:
```ts
client.inboxes.create(body: CreateInbox = {}): Promise<CreatedInbox>
```

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

A new address that receives mail as soon as the call returns. With `webhookUrl` and `key`, the answer carries the webhook's signing secret and the inbox-scoped key's token, once.

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

## client.inboxes.get

TypeScript:
```ts
client.inboxes.get(inboxId: string): Promise<Inbox>
```

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

One inbox.

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

## client.inboxes.update

TypeScript:
```ts
client.inboxes.update(inboxId: string, body: UpdateInbox): Promise<Inbox>
```

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

Display name, external identifier or replacement metadata. Omitted fields are preserved.

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

## client.inboxes.delete

TypeScript:
```ts
client.inboxes.delete(inboxId: string): Promise<void>
```

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

Releases the address, revokes the inbox's keys, removes its webhook and stops delivery.

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

## client.inboxes.rules.list

TypeScript:
```ts
client.inboxes.rules.list(inboxId: string): Promise<RuleList>
```

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

Active rules in execution order, oldest first.

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`.

## client.inboxes.rules.create

TypeScript:
```ts
client.inboxes.rules.create(inboxId: string, body: CreateRule): Promise<Rule>
```

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

A bounded rule, enabled by default.

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`.

## client.inboxes.rules.get

TypeScript:
```ts
client.inboxes.rules.get(inboxId: string, ruleId: string): Promise<Rule>
```

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

One active 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`.

## client.inboxes.rules.update

TypeScript:
```ts
client.inboxes.rules.update(inboxId: string, ruleId: string, body: UpdateRule): Promise<Rule>
```

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

Replace supplied fields and cancel pending snapshots of the old revision.

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`.

## client.inboxes.rules.delete

TypeScript:
```ts
client.inboxes.rules.delete(inboxId: string, ruleId: string): Promise<void>
```

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

Soft-delete the rule and cancel its pending snapshots.

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`.

## client.inboxes.rules.runs

TypeScript:
```ts
client.inboxes.rules.runs(inboxId: string, ruleId: string, params: PageParams = {}): Promise<RuleRunPage>
```

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

Execution history, newest first. Uncertain mail is never retried automatically.

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`.

## client.inboxes.rules.iterateRuns

TypeScript:
```ts
client.inboxes.rules.iterateRuns(inboxId: string, ruleId: string, params: PageParams = {}): AsyncGenerator<RuleRun, void, undefined>
```

Every run of a rule, newest first, page by page.
