# GET /email/attachment

**Resource:** [Email](./email.md)  
**MCP tool:** `download_email_attachment`  
**Scopes:** `email:read`  
**Write operation:** no

Read an attachment from a received email without saving it anywhere. Returns name, mime_type, size and sha256, plus the content: a text file (XML, CSV, JSON, .txt, .eml) comes back as text; a .zip or .gz comes back as archive_files, the name, size and text of each file inside (up to 20 files, 2MB each, 4MB in all; a file past a limit is listed with a skipped reason); anything else, such as a PDF or image, comes back as content_base64. Works for email received via Gmail and for kept TrustPager Mail attachments, up to 5MB. To keep the file on a contact, customer or opportunity, use save_email_attachment instead.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `inbound_email_id` | query | string | yes | UUID of the received email holding the attachment: the id of an inbound message from list_email_thread_messages. |
| `attachment_name` | query | string | yes | Exact filename of the attachment as listed in that message's attachments array, e.g. "report.zip". |
| `attachment_index` | query | number | no | Position of the attachment in the message's attachments array (0 is the first). Only needed when two attachments share a name. |
| `include_base64` | query | boolean | no | Also return the raw file as content_base64 when it reads as text. Default false. Binary files (PDFs, images) always come back as content_base64. |

## Request example

```bash
curl   "https://api.trustpager.com/functions/v1/api/v1/email/attachment"   -H "Authorization: Bearer YOUR_API_KEY"
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`