# AgentMail Get Attachment

> AgentMail Get Attachment is a free API for AI agents from AgentMail at mpp.api.agentmail.to, Free, status unknown (last checked 2026-10-09).

Retrieves metadata and a temporary download URL for a specific email attachment in an AgentMail inbox message

## Facts

- Endpoint: GET https://mpp.api.agentmail.to/v0/inboxes/:inbox_id/messages/:message_id/attachments/:attachment_id?utm_source=zero.xyz
- Price: Free
- Status: unknown
- Last checked: 2026-10-09
- Activations on Zero: 0
- Provider: AgentMail
- Docs: https://docs.agentmail.to
- Website: https://agentmail.to
- Tags: email, inboxes, domains, drafts, threads, webhooks, messaging, ai, social
- Canonical page: https://www.zero.xyz/c/agentmail-attachment-id-4d9812e5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bPCMuSPhdu5RBDCylrkDI

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agentmail-attachment-id-4d9812e5
```

Example prompt: Fetch the attachment with ID att_abc123 from message msg_xyz789 in inbox inbox_001 on AgentMail — I need the filename, content type, and download URL so I can process the file.

## When to prefer this

Use this endpoint when an AI agent has already retrieved a message listing and needs to access the binary content or metadata of a specific attachment by its known ID. Prefer this over listing attachments when the attachment_id is already known from a prior message fetch.

## Known failure modes

- 404 Not Found if the inbox_id, message_id, or attachment_id does not exist or is not accessible
- 401 Unauthorized if the Bearer token is missing or invalid
- 403 Forbidden if the authenticated user does not have access to the specified inbox
- 410 Gone if the download URL has already expired
- 400 Bad Request if required path parameters are malformed or missing

## How this service works

Get Attachment

## Output

Returns an AttachmentResponse object containing the attachment ID, file size in bytes, filename, content type (e.g. application/pdf), content disposition (inline or attachment), content ID, a temporary download URL, and the datetime when that URL expires.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "inbox_id",
  "message_id",
  "attachment_id"
 ],
 "properties": {
  "inbox_id": {
   "type": "string",
   "title": "InboxId",
   "description": "The ID of the inbox."
  },
  "message_id": {
   "type": "string",
   "title": "MessageId",
   "description": "ID of message."
  },
  "attachment_id": {
   "type": "string",
   "title": "AttachmentId",
   "description": "ID of attachment."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "title": "AttachmentResponse",
 "required": [
  "attachment_id",
  "size",
  "download_url",
  "expires_at"
 ],
 "properties": {
  "size": {
   "type": "integer",
   "title": "AttachmentSize",
   "description": "Size of attachment in bytes."
  },
  "filename": {
   "type": "string",
   "title": "AttachmentFilename",
   "description": "Filename of attachment."
  },
  "content_id": {
   "type": "string",
   "title": "AttachmentContentId",
   "description": "Content ID of attachment."
  },
  "expires_at": {
   "type": "string",
   "format": "date-time",
   "description": "Time at which the download URL expires."
  },
  "content_type": {
   "type": "string",
   "title": "AttachmentContentType",
   "description": "Content type of attachment."
  },
  "download_url": {
   "type": "string",
   "description": "URL to download the attachment."
  },
  "attachment_id": {
   "type": "string",
   "title": "AttachmentId",
   "description": "ID of attachment."
  },
  "content_disposition": {
   "enum": [
    "inline",
    "attachment"
   ],
   "type": "string",
   "title": "AttachmentContentDisposition",
   "description": "Content disposition of attachment."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentmail-attachment-id-4d9812e5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from mpp.api.agentmail.to](https://www.zero.xyz/host/mpp.api.agentmail.to/llms.txt)
