Python SDK: Passport

The methods of the Python client under Passport. The outside services an inbox's address is signed up for, the verification codes and sign-in links they send, and how the address signs in to the ones that accept Sign in with Doorman.

client.inboxes.services.create

Python

client.inboxes.services.create(inbox_id: str, body: models.CreateService) -> models.Service

Sends inboxes.services.create: POST /v1/inboxes/{inboxId}/services

Declare or add a service.

Access any: any API key, or a console session. An app token needs mail:write and mail:read.

client.inboxes.sign_ins.create

Python

client.inboxes.sign_ins.create(inbox_id: str, body: models.StartSignIn) -> models.SignInStart

Sends inboxes.signIns.create: POST /v1/inboxes/{inboxId}/sign-ins

Start a sign-in.

Access any: any API key, or a console session. An app token needs mail:write and mail:read. Part of Sign in with Doorman, which a deployment switches on: where it is off, the call answers 404 not_found.

client.inboxes.verifications.list

Python

client.inboxes.verifications.list(inbox_id: str, *, domain: str | None = None, since: str | None = None, wait_seconds: int | None = None) -> models.VerificationList

Sends inboxes.verifications.list: GET /v1/inboxes/{inboxId}/verifications

Read verification codes.

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

client.passport.get

Python

client.passport.get() -> models.PassportSettings

Sends passport.get: GET /v1/passport

Read passport settings.

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

client.passport.update

Python

client.passport.update(body: models.UpdatePassportSettings) -> models.PassportSettings

Sends passport.update: PATCH /v1/passport

Update passport settings.

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

client.services.delete

Python

client.services.delete(service_id: str) -> None

Sends services.delete: DELETE /v1/services/{serviceId}

Delete a service.

Access any: any API key, or a console session. App tokens are refused.

client.services.get

Python

client.services.get(service_id: str) -> models.ServiceDetail

Sends services.get: GET /v1/services/{serviceId}

Read a service.

Access any: any API key, or a console session. App tokens are refused.

client.services.list

Python

client.services.list(*, inbox_id: str | None = None, status: Literal['pending', 'active', 'cancelled', 'archived'] | None = None, attention: bool | None = None, q: str | None = None, limit: int | None = None, offset: int | None = None) -> models.ServicePage

Sends services.list: GET /v1/services

List services.

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

client.services.iterate

Python

client.services.iterate(*, inbox_id: str | None = None, status: Literal['pending', 'active', 'cancelled', 'archived'] | None = None, attention: bool | None = None, q: str | None = None, limit: int | None = None, offset: int | None = None) -> Iterator[models.Service]

Every item of client.services.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.services.update

Python

client.services.update(service_id: str, body: models.UpdateService) -> models.Service

Sends services.update: PATCH /v1/services/{serviceId}

Update a service.

Access any: any API key, or a console session. App tokens are refused.

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