Attachments

Incoming attachment metadata is stored at ingest from Resend. Small files (default ≤2MB) are cached in the same R2 bucket as raw MIME for fast download.

REST

GET /v1/inboxes/:inboxId/messages/:messageId/attachments
→ { "attachments": [{ "id", "filename", "cached", "downloadUrl" }] }

GET …/attachments/:attachmentId
→ file stream (R2 or Resend proxy)

GET …/attachments/:attachmentId  Accept: application/json
→ { "downloadUrl", "expiresAt", "cached" }

MCP (v0.7)

mailagent_list_attachments { inboxId, messageId }
mailagent_get_attachment { inboxId, messageId, attachmentId }

mailagent_list_messages includes attachmentCount.

Verify response adds hasAttachments and attachmentCount.

Full guide (repo) →