# 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 download URL for a specific attachment on an email draft in an AgentMail inbox.

## Facts

- Endpoint: GET https://mpp.api.agentmail.to/v0/inboxes/:inbox_id/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-cd7b2cd7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gzadXTvbgJcFk5D-0H4Q7

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

Example prompt: Can you fetch the attachment details for attachment ID 'att_abc123' on draft ID 'dft_xyz789' in inbox 'inbox_001'? I need the download URL and filename.

## When to prefer this

Use this endpoint when you need to retrieve metadata or a download URL for a file attached to a specific email draft in AgentMail. Prefer this over generic file storage lookups when the attachment is associated with an AI agent's inbox draft workflow.

## Known failure modes

- 404 Not Found — invalid inbox_id, draft_id, or attachment_id
- 401 Unauthorized — missing or invalid Bearer token
- Download URL already expired — expires_at has passed
- Attachment does not belong to the specified draft or inbox
- Malformed path parameters causing routing errors

## How this service works

Get Attachment

## Output

Returns an AttachmentResponse object containing the attachment_id, filename, content_type, size in bytes, a temporary download_url, the expiry timestamp (expires_at), content_disposition (inline or attachment), and optional content_id.

## Request schema (JSON Schema)

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