Instantiation
Composing a message
Use theMail helper to compose messages. It handles formatting and automatically base64-encodes HTML content before sending.
mail.get() to get the formatted dict ready for the API.
Attachments
optional_headers dict:
Send a message
Check delivery status
deliveryStatus values: delivered, delivered via secure portal, soft bounced, hard bounced, processing. Opens are reported separately in openedStatus.
Scheduled send
Schedule a message for future delivery, check its status, reschedule, or cancel it.Schedule a message
scheduled_at must be an ISO 8601 UTC datetime string in the future and within 30 days.
Get scheduled message status
Reschedule a message
Cancel a scheduled message
The Response object
EveryPauboxApiClient method returns a Response object:
Error handling
All client methods raiserequests.exceptions.HTTPError on non-2xx responses. Before raising, the SDK prints the error response body to standard output. Wrap calls in a try/except block: