# AgentMail Get Email Attachment

> AgentMail Get Email 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 by ID from a thread within an AI agent's inbox

## Facts

- Endpoint: GET https://x402.api.agentmail.to/v0/inboxes/%7Binbox_id%7D/threads/%7Bthread_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-email-attachment-aa949a0a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2Q44IFtALknSlaBIbnoi8

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-email-attachment-aa949a0a
```

Example prompt: Fetch the attachment with ID att_abc123 from thread thread_xyz456 in inbox inbox_99 so I can read the file that was sent to me.

## When to prefer this

Use this endpoint when an AI agent needs to retrieve a specific, known attachment from an email thread — for example, after listing threads and identifying an attachment ID. Prefer this over listing all messages when you already have the inbox, thread, and attachment identifiers.

## Known failure modes

- Inbox ID not found — 404 error
- Thread ID not found within the given inbox — 404 error
- Attachment ID not found within the given thread — 404 error
- Unauthorized access to inbox — 401/403 error
- Invalid ID format — 400 bad request
- Attachment has been deleted or expired — 410 gone

## How this service works

Service: AgentMail API (/v0/inboxes/{inbox_id}/threads/{thread_id}/attachments/{attachment_id})

## Output

Returns the attachment data (file content and/or metadata) for the specified attachment ID within a given email thread and inbox, as a JSON object.

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentmail-get-email-attachment-aa949a0a/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)
