> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lupin.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Attachments

> Base64 or URL-backed files, stored on R2.

# Attachments

Send with `content` (base64) or `url` (fetched, redirects + presigned URLs OK):

```json theme={null}
{ "attachments": [
  { "filename": "report.pdf", "content_type": "application/pdf", "content": "<base64>" },
  { "filename": "data.csv", "url": "https://…/data.csv?sig=…" }
] }
```

Limits: whole request ≤ 6 MB; URL-backed ≈ 30 MB per email.
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.
