Python SDK: Account

The methods of the Python client under Account. The account, its plan and usage, and account-wide counts.

client.me

Python

client.me() -> models.Me

Sends me: GET /v1/me

Who am I.

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

client.metrics

Python

client.metrics(*, from_: str | None = None, to: str | None = None, interval: Literal['hour', 'day'] | None = None, inbox_id: str | None = None) -> models.Metrics

Sends metrics: GET /v1/metrics

Metrics.

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

client.overview

Python

client.overview() -> models.Overview

Sends overview: GET /v1/overview

Overview.

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

client.billing.checkout

Python

client.billing.checkout() -> models.BillingRedirect

Sends billing.checkout: POST /v1/billing/checkout

Start a checkout.

Access session: a console session only; an API key gets 403 session_required. App tokens are refused. Part of billing, which a deployment switches on: where it takes no payments, the call answers 404 not_found.

client.billing.portal

Python

client.billing.portal() -> models.BillingRedirect

Sends billing.portal: POST /v1/billing/portal

Open the billing portal.

Access session: a console session only; an API key gets 403 session_required. App tokens are refused. Part of billing, which a deployment switches on: where it takes no payments, the call answers 404 not_found.

client.billing.seats

Python

client.billing.seats(body: models.SetSeats) -> models.BillingSynced

Sends billing.seats: POST /v1/billing/seats

Change the organization's seats.

Access session: a console session only; an API key gets 403 session_required. App tokens are refused. Part of billing, which a deployment switches on: where it takes no payments, the call answers 404 not_found.

client.billing.sync

Python

client.billing.sync() -> models.BillingSynced

Sends billing.sync: POST /v1/billing/sync

Read billing again.

Access session: a console session only; an API key gets 403 session_required. App tokens are refused. Part of billing, which a deployment switches on: where it takes no payments, the call answers 404 not_found.

client.invitations.create

Python

client.invitations.create(body: models.CreateInvitation) -> models.Invitation

Sends invitations.create: POST /v1/invitations

Invite someone to the organization.

Access session: a console session only; an API key gets 403 session_required. App tokens are refused.

client.invitations.list

Python

client.invitations.list() -> models.InvitationList

Sends invitations.list: GET /v1/invitations

List the organization's invitations.

Access session: a console session only; an API key gets 403 session_required. App tokens are refused.

client.invitations.revoke

Python

client.invitations.revoke(invitation_id: str) -> None

Sends invitations.revoke: DELETE /v1/invitations/{invitationId}

Take an invitation back.

Access session: a console session only; an API key gets 403 session_required. App tokens are refused.

client.invitations.update

Python

client.invitations.update(invitation_id: str, body: models.UpdateInvitation) -> models.Invitation

Sends invitations.update: PATCH /v1/invitations/{invitationId}

Record that an invitation was sent.

Access session: a console session only; an API key gets 403 session_required. App tokens are refused.

client.members.list

Python

client.members.list() -> models.MemberList

Sends members.list: GET /v1/members

List the organization's members.

Access session: a console session only; an API key gets 403 session_required. App tokens are refused.

client.members.update

Python

client.members.update(user_id: str, body: models.UpdateMember) -> models.Member

Sends members.update: PATCH /v1/members/{userId}

Change a member's role.

Access session: a console session only; an API key gets 403 session_required. App tokens are refused.

client.organization.adopt

Python

client.organization.adopt(body: models.AdoptAccount) -> models.Account

Sends organization.adopt: POST /v1/organization/adopt

Move a personal account into the organization.

Access session: a console session only; an API key gets 403 session_required. App tokens are refused.

client.push.get

Python

client.push.get() -> models.PushSettings

Sends push.get: GET /v1/push

Read notification settings.

Access session: a console session only; an API key gets 403 session_required. App tokens are refused.

client.push.subscriptions.create

Python

client.push.subscriptions.create(body: models.CreatePushSubscription) -> models.PushSubscription

Sends push.subscriptions.create: POST /v1/push/subscriptions

Switch notifications on for a browser.

Access session: a console session only; an API key gets 403 session_required. App tokens are refused.

client.push.subscriptions.delete

Python

client.push.subscriptions.delete(subscription_id: str) -> None

Sends push.subscriptions.delete: DELETE /v1/push/subscriptions/{subscriptionId}

Switch notifications off for a browser.

Access session: a console session only; an API key gets 403 session_required. App tokens are refused.

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