Attachments & inline images
Attach files to any send by including base64-encoded content in the attachments array:
{ "attachments": [ { "filename": "invoice.pdf", "content_type": "application/pdf", "content": "JVBERi0xLjQK..." } ]}Request bodies are capped at 25 MB; base64 inflates content by ~33%, so that’s roughly an
18 MB attachment budget per email. Invalid base64 is rejected with a validation_error.
Inline images
Section titled “Inline images”Give an attachment a content_id and reference it from your HTML with a cid: URL; the
attachment is emitted with a matching Content-ID MIME header:
{ "html": "<p>Cheers!</p><img src=\"cid:logo\">", "attachments": [ { "filename": "logo.png", "content_type": "image/png", "content": "<base64>", "content_id": "logo" } ]}Retrieving attachments
Section titled “Retrieving attachments”GET /emails/{id}/attachments: list an email’s attachments (filename, content type, size).GET /emails/{id}/attachments/{attachmentId}: download one.
Inbound mail has the same pair under /emails/received/{id}/attachments; see
Inbound email.