Python SDK: Webhooks
The methods of the Python client under Webhooks. The inbox webhook, account endpoints, their signed deliveries and the delivery log.
client.deliveries.retry
client.deliveries.retry(delivery_id: str) -> models.DeliverySends deliveries.retry: POST /v1/deliveries/{deliveryId}/retry
Retry a delivery.
Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. An app token needs webhooks:manage and events:read and mail:read.
client.inboxes.webhook.delete
client.inboxes.webhook.delete(inbox_id: str) -> NoneSends inboxes.webhook.delete: DELETE /v1/inboxes/{inboxId}/webhook
Remove the inbox webhook.
Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. App tokens are refused.
client.inboxes.webhook.deliveries
client.inboxes.webhook.deliveries(inbox_id: str, *, limit: int | None = None, cursor: str | None = None) -> models.DeliveryPageSends inboxes.webhook.deliveries: GET /v1/inboxes/{inboxId}/webhook/deliveries
List the inbox webhook's deliveries.
Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. App tokens are refused.
client.inboxes.webhook.iterate_deliveries
client.inboxes.webhook.iterate_deliveries(inbox_id: str, *, limit: int | None = None, cursor: str | None = None) -> Iterator[models.Delivery]Every item of client.inboxes.webhook.deliveries, 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.webhook.get
client.inboxes.webhook.get(inbox_id: str) -> models.InboxWebhookSends inboxes.webhook.get: GET /v1/inboxes/{inboxId}/webhook
Read the inbox webhook.
Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. App tokens are refused.
client.inboxes.webhook.rotate_secret
client.inboxes.webhook.rotate_secret(inbox_id: str) -> models.InboxWebhookSecretSends inboxes.webhook.rotateSecret: POST /v1/inboxes/{inboxId}/webhook/rotate-secret
Rotate the inbox webhook's secret.
Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. App tokens are refused.
client.inboxes.webhook.set
client.inboxes.webhook.set(inbox_id: str, body: models.SetInboxWebhook) -> models.InboxWebhookSecretSends inboxes.webhook.set: PUT /v1/inboxes/{inboxId}/webhook
Set the inbox webhook.
Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. App tokens are refused.
client.webhooks.create
client.webhooks.create(body: models.CreateEndpoint) -> models.CreatedEndpointSends webhooks.create: POST /v1/webhooks
Create an endpoint.
Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. An app token needs webhooks:manage and events:read and mail:read.
client.webhooks.delete
client.webhooks.delete(endpoint_id: str) -> NoneSends webhooks.delete: DELETE /v1/webhooks/{endpointId}
Delete an endpoint.
Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. An app token needs webhooks:manage and events:read and mail:read.
client.webhooks.deliveries
client.webhooks.deliveries(endpoint_id: str, *, limit: int | None = None, cursor: str | None = None) -> models.DeliveryPageSends webhooks.deliveries: GET /v1/webhooks/{endpointId}/deliveries
List an endpoint's deliveries.
Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. An app token needs webhooks:manage and events:read and mail:read.
client.webhooks.iterate_deliveries
client.webhooks.iterate_deliveries(endpoint_id: str, *, limit: int | None = None, cursor: str | None = None) -> Iterator[models.Delivery]Every item of client.webhooks.deliveries, 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.webhooks.get
client.webhooks.get(endpoint_id: str) -> models.EndpointSends webhooks.get: GET /v1/webhooks/{endpointId}
Read an endpoint.
Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. An app token needs webhooks:manage and events:read and mail:read.
client.webhooks.list
client.webhooks.list() -> models.EndpointListSends webhooks.list: GET /v1/webhooks
List endpoints.
Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. An app token needs webhooks:manage and events:read and mail:read.
client.webhooks.rotate_secret
client.webhooks.rotate_secret(endpoint_id: str) -> models.EndpointSecretSends webhooks.rotateSecret: POST /v1/webhooks/{endpointId}/rotate-secret
Rotate an endpoint's secret.
Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. An app token needs webhooks:manage and events:read and mail:read.
client.webhooks.test
client.webhooks.test(endpoint_id: str) -> models.EndpointTestResultSends webhooks.test: POST /v1/webhooks/{endpointId}/test
Send a test delivery.
Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. An app token needs webhooks:manage and events:read and mail:read.
client.webhooks.update
client.webhooks.update(endpoint_id: str, body: models.UpdateEndpoint) -> models.EndpointSends webhooks.update: PATCH /v1/webhooks/{endpointId}
Change an endpoint.
Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. An app token needs webhooks:manage and events:read and mail:read.

