# AgentMail Get Raw Email Message

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

Retrieves the raw email message content (full RFC 2822 format) for a specific message in an AgentMail inbox

## Facts

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

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-raw-email-message-91730ca0
```

Example prompt: Can you fetch the raw email source for message msg_abc123 in inbox inbox_xyz456 on AgentMail so I can inspect its full headers and MIME structure?

## When to prefer this

Use this endpoint when you need the complete, unprocessed email content including all headers and raw MIME structure — for example, to parse custom headers, inspect MIME boundaries, verify email authenticity (DKIM/SPF headers), or archive the exact bytes received. Prefer this over parsed-message endpoints when you need full fidelity or are building custom parsing logic.

## Known failure modes

- 404 Not Found if the inbox_id or message_id does not exist or belong to the authenticated account
- 401 Unauthorized if authentication credentials are missing or invalid
- 403 Forbidden if the agent does not have access to the specified inbox
- Empty response body if the message has no content
- Payment required error if x402 payment not provided or insufficient

## How this service works

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

## Output

The complete raw RFC 2822 email message including all headers (From, To, Subject, Date, Message-ID, MIME headers, etc.) and the full MIME body with all parts, as received by the AgentMail server for that inbox and message ID.

## Response schema (JSON Schema)

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

## More

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