# AgentMail Get Message Attachment

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

Retrieves a specific email attachment from a message in an AgentMail inbox by attachment ID

## Facts

- Endpoint: GET https://x402.api.agentmail.to/v0/inboxes/%7Binbox_id%7D/messages/%7Bmessage_id%7D/attachments/%7Battachment_id%7D
- Price: Free
- Status: unknown
- Last checked: 2026-09-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentmail-get-message-attachment-b8ad8823
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DTzrS53PZUCGLaSAoVrUc

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-get-message-attachment-b8ad8823
```

Example prompt: Fetch the attachment with ID att_789 from message msg_456 in my AgentMail inbox inb_123 so I can read the file that was emailed to my agent.

## When to prefer this

Use this endpoint when an AI agent has already identified a specific attachment ID from a message listing and needs to retrieve the actual attachment content. Prefer this over listing endpoints when you already know the exact inbox, message, and attachment IDs.

## Known failure modes

- Invalid inbox_id returns 404 not found
- Invalid message_id returns 404 not found
- Invalid attachment_id returns 404 not found
- Unauthorized access returns 401 or 403
- Attachment has been deleted or expired returns 404
- Rate limiting returns 429 too many requests

## How this service works

Service: AgentMail API (/v0/inboxes/{inbox_id}/messages/{message_id}/attachments/{attachment_id})

## Output

Returns the binary or structured content of the requested email attachment, including the file data associated with the given attachment ID within the specified message and inbox.

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {}
}
```

## More

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