Skip to main content

Creating a client

See Authentication for details on all three options.

Building a message

Use Message::builder() to compose a message. All methods take impl Into<String> or iterables:
.build() validates required fields and returns Err(PauboxError::Validation(...)) if any are missing.

Attachments

The from_bytes constructor base64-encodes the data automatically; no manual encoding needed:
If you already have base64-encoded content:
Add attachments to a message via the builder:

Send a message

SendResponse fields:

Check delivery status

MessageDelivery fields:

Health check

Returns Ok(()) if the API is reachable, or a PauboxError if not.

Error handling

All methods return Result<T, PauboxError>. Match on the variants to handle specific conditions:
PauboxError variants: