Skip to main content
You can attach files to any message sent through the Email API. Attachments are added as an attachments array on the message, where each entry describes a single file.
The whole request body, including Base64-encoded attachments, must not exceed 50 MB. Base64 adds about a third to file size, so plan for roughly 37 MB of raw files per message. See Limits and overage rates for all sending limits.

Attachment fields

Each attachment is an object with three required fields and two optional ones:

REST API example

Add the attachments array to the message body. The example below attaches a small text file (Hello World! Base64-encoded as SGVsbG8gV29ybGQh):
See the full Send a message reference for the complete request body.

Inline images

To embed an image in the HTML body, set disposition to inline, give it a contentId, and reference that ID with a cid: URL. Inline attachments must use an image/* contentType; otherwise the request returns 400.

SDK examples

Most Paubox SDKs accept attachments in the same fileName / contentType / content shape. The file content is always Base64-encoded.
For language-specific details, see each SDK’s email client guide — for example the Python SDK or Node.js SDK.

Sending from the CLI

The Paubox CLI accepts files directly with the --attachment flag and handles the Base64 encoding for you:
See the CLI commands reference for all available flags.