Attachments
Upload, attach, and download files on email messages.
Upload flow
Attachments use a two-step process:
- Upload — POST a file to
/v1/attachmentsas multipart form data. You get back an attachment ID. - Attach — Include the attachment ID(s) in the
attachmentsarray when sending a message viaPOST /v1/mailboxes/:id/messages.
Inbound attachments are extracted and stored automatically. They appear in the attachments array on the message object.
Downloading attachments
Fetch attachment metadata and a presigned download URL via GET /v1/attachments/:id. The presigned URL is valid for 24 hours and points directly to Cloudflare R2 storage. See the Attachments API reference.
Size limits
- Maximum file size per attachment: 25 MB
- Maximum total message size (including all attachments): 10 MB (SES limit)
- Storage counts toward your account's storage quota