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

# Python SDK: Inboxes

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

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

## client.inboxes.create

Python:
```python
client.inboxes.create(body: models.CreateInbox) -> models.CreatedInbox
```

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

## client.inboxes.delete

Python:
```python
client.inboxes.delete(inbox_id: str) -> None
```

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

## client.inboxes.get

Python:
```python
client.inboxes.get(inbox_id: str) -> models.Inbox
```

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

## client.inboxes.list

Python:
```python
client.inboxes.list(*, q: str | None = None, external_id: str | None = None, limit: int | None = None, offset: int | None = None) -> models.InboxPage
```

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

## client.inboxes.iterate

Python:
```python
client.inboxes.iterate(*, q: str | None = None, external_id: str | None = None, limit: int | None = None, offset: int | None = None) -> Iterator[models.InboxListItem]
```

Every item of [`client.inboxes.list`](https://doorman.fyi/docs/python/reference/inboxes.md#inboxes-list), one page at a time: the next page is asked for when the loop reaches it. A page that does not advance raises `ApiError`.

## client.inboxes.update

Python:
```python
client.inboxes.update(inbox_id: str, body: models.UpdateInbox) -> models.Inbox
```

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

## client.inboxes.rules.create

Python:
```python
client.inboxes.rules.create(inbox_id: str, body: models.CreateRule) -> models.Rule
```

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

## client.inboxes.rules.delete

Python:
```python
client.inboxes.rules.delete(inbox_id: str, rule_id: str) -> None
```

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

## client.inboxes.rules.get

Python:
```python
client.inboxes.rules.get(inbox_id: str, rule_id: str) -> models.Rule
```

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

## client.inboxes.rules.list

Python:
```python
client.inboxes.rules.list(inbox_id: str) -> models.RuleList
```

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

## client.inboxes.rules.runs

Python:
```python
client.inboxes.rules.runs(inbox_id: str, rule_id: str, *, limit: int | None = None, offset: int | None = None) -> models.RuleRunPage
```

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

## client.inboxes.rules.iterate_runs

Python:
```python
client.inboxes.rules.iterate_runs(inbox_id: str, rule_id: str, *, limit: int | None = None, offset: int | None = None) -> Iterator[models.RuleRun]
```

Every item of [`client.inboxes.rules.runs`](https://doorman.fyi/docs/python/reference/inboxes.md#inboxes-rules-runs), one page at a time: the next page is asked for when the loop reaches it. A page that does not advance raises `ApiError`.

## client.inboxes.rules.update

Python:
```python
client.inboxes.rules.update(inbox_id: str, rule_id: str, body: models.UpdateRule) -> models.Rule
```

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