Python SDK: Sending

The methods of the Python client under Sending. New messages and replies from an inbox, with idempotent retries.

client.drafts.delete

Python

client.drafts.delete(held_send_id: str) -> None

Sends drafts.delete: DELETE /v1/drafts/{heldSendId}

Take a draft back.

Access key: an API key, or a correctly scoped app token where delegated access is allowed; console sessions are refused. An app token needs mail:draft.

client.inboxes.send

Python

client.inboxes.send(inbox_id: str, body: models.SendMessage, *, idempotency_key: str | None = None) -> models.SendOutcome

Sends inboxes.send: POST /v1/inboxes/{inboxId}/send

Send a message or reply.

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

client.inboxes.drafts.create

Python

client.inboxes.drafts.create(inbox_id: str, body: models.SendMessage) -> models.HeldSend

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

Write a draft for the owner to send.

Access key: an API key, or a correctly scoped app token where delegated access is allowed; console sessions are refused. An app token needs mail:draft and mail:read.

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