# AgentMail Get Draft Attachment

> AgentMail Get Draft 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 attachment on an email draft

## Facts

- Endpoint: GET https://mpp.api.agentmail.to/v0/drafts/:draft_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-d279ad7a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qbPmUayHOuTCy42Lre_kg

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-d279ad7a
```

Example prompt: Can you get the attachment details for attachment abc123 on draft draft_xyz456 in AgentMail — I need the filename, size, and download URL?

## When to prefer this

Use this endpoint when you need to retrieve metadata or a download link for a specific attachment on an AgentMail draft email. Prefer this when you already know both the draft_id and attachment_id and need the file's content type, size, filename, or a temporary URL to actually download the file content.

## Known failure modes

- draft_id not found — 404 error if the specified draft does not exist
- attachment_id not found — 404 error if the attachment does not exist on the given draft
- Missing or invalid Authorization header — 401 unauthorized error
- Download URL already expired — the URL returned is time-limited and will return 403/410 after expiry
- Malformed path parameters — 400 bad request if draft_id or attachment_id are missing or invalid format

## How this service works

Get Attachment

## Output

Returns an AttachmentResponse object containing the attachment_id, file size in bytes, a temporary download_url, an expires_at timestamp for when the URL expires, and optionally the filename, content_type, content_id, and content_disposition (inline or attachment).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "draft_id",
  "attachment_id"
 ],
 "properties": {
  "draft_id": {
   "type": "string",
   "title": "DraftId",
   "description": "ID of draft."
  },
  "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-d279ad7a/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)
