Attachments

Upload, attach, and download files on email messages.

Upload flow

Attachments use a two-step process:

  1. Upload — POST a file to /v1/attachments as multipart form data. You get back an attachment ID.
  2. Attach — Include the attachment ID(s) in the attachments array when sending a message via POST /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