Python SDK: Inboxes

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

client.inboxes.create

Python

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

Sends 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

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

Sends 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

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

Sends 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

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

Sends 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

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, 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

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

Sends 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

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

Sends 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

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

Sends 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

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

Sends 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

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

Sends 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

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

Sends 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

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, 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

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

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

Up Down to move, Enter to open, Esc to close