# AgentMail Get Draft Attachment

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

Retrieves a specific attachment from an email draft by draft ID and attachment ID

## Facts

- Endpoint: GET https://x402.api.agentmail.to/v0/drafts/%7Bdraft_id%7D/attachments/%7Battachment_id%7D
- Price: Free
- Payment: x402
- Status: unknown
- Last checked: 2026-09-08
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentmail-get-draft-attachment-2968eed4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4cRw8YvE0y2t7S7XrHdb4

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-draft-attachment-2968eed4
```

Example prompt: Can you fetch attachment abc123 from draft draft456 in AgentMail so I can see what file is attached before sending?

## When to prefer this

Use this endpoint when you need to inspect or retrieve a specific file attachment on a draft email before sending it, particularly in agentic workflows where you need to verify or read back attachment content that was previously added to a draft.

## Known failure modes

- draft_id not found — 404 not found error
- attachment_id not found on the specified draft — 404 not found error
- Invalid or missing authentication — 401 unauthorized
- draft_id or attachment_id malformed — 400 bad request
- Attachment has been deleted — 410 gone

## How this service works

AgentMail gives AI agents real email inboxes. Create, send, receive, and search messages via REST API — built for autonomous agents and agentic workflows.

## Output

Returns JSON with details about the specified attachment on the draft, including file metadata and content information. The response schema is open-ended JSON.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "pathParams"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "draft_id",
      "attachment_id"
     ],
     "properties": {
      "draft_id": {
       "type": "string"
      },
      "attachment_id": {
       "type": "string"
      }
     },
     "additionalProperties": false
    },
    "queryParams": {
     "type": "object",
     "properties": {},
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "additionalProperties": true
    }
   },
   "additionalProperties": false
  }
 },
 "additionalProperties": false
}
```

## Response schema (JSON Schema)

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

## More

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