Creating a client
paubox.New accepts optional functional options:
Retry configuration
By default the client retriesGET requests up to 3 times on 429 and 5xx responses, with exponential backoff between 500 ms and 30 s.
Send a message
Message fields
paubox.Ptr[T] helper creates a pointer to any value, which is required for optional fields typed as *T:
Response
Send a batch
Send up to 50 messages in a single API call. Each message gets its own tracking ID.Check delivery status
disp.Data.Message.MessageDeliveries is a slice of per-recipient records:
DeliveryStatus values: delivered, opened, failed, pending.
Dynamic templates
Templates use Handlebars syntax ({{variable_name}}).
Create a template
List templates
Get a template
Update a template
Delete a template
Send a templated message
Error handling
All methods return a typederror. Use errors.As to inspect details and errors.Is to match sentinels: