Attachments
Send withcontent (base64) or url (fetched, redirects + presigned URLs OK):
/v0 JSON request body is capped at 32 MiB (32 × 1024 × 1024
bytes), including base64 encoding and all other fields. Email sending separately
caps the combined decoded attachment bytes at 30 MiB. Base64 expansion can
hit the request limit before the decoded attachment limit; leave room for the
rest of the message. URL-backed files are fetched server-side and still pass
the applicable download and combined-send checks.
Message, thread and draft objects embed attachment metadata
(attachment_id, filename, size, content_type, …).
Download: GET …/emails/:id/attachments/:attachment_id,
GET …/threads/:id/attachments/:attachment_id,
GET …/drafts/:id/attachments/:attachment_id (draft and project paths included).
Bytes live on R2 in production with an in-memory fallback for dev/test.