# AgentMail Get Raw Message

> AgentMail Get Raw Message is a free API for AI agents from AgentMail at mpp.api.agentmail.to, Free, status unknown (last checked 2026-10-11).

Returns a presigned S3 download URL for the raw .eml file of a specific email message in an AgentMail inbox

## Facts

- Endpoint: GET https://mpp.api.agentmail.to/v0/inboxes/:inbox_id/messages/:message_id/raw?utm_source=zero.xyz
- Price: Free
- Status: unknown
- Last checked: 2026-10-11
- 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-raw-a089023d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KQsqjpDfQ6g9ERXaEj3Xz

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-raw-a089023d
```

Example prompt: Can you get me a download link for the raw .eml file of message msg_abc123 in inbox inbox_xyz456 on AgentMail?

## When to prefer this

Use this endpoint when you need the complete, unprocessed email content including all MIME parts, raw headers, attachments, and encoding — for example, to archive emails as .eml files, to parse non-standard headers, or to pass the full raw message to another system. Prefer this over parsed message endpoints when you need the ground-truth email source rather than extracted fields.

## Known failure modes

- 404 if the inbox_id or message_id does not exist
- 401/403 if the Authorization Bearer token is missing or invalid
- Expired download_url if the agent waits too long after fetching (check expires_at before downloading)
- 500 server error if S3 presigned URL generation fails

## How this service works

Get Raw Message

## Output

Returns a RawMessageResponse object containing the message ID, the size of the raw message in bytes, a presigned S3 URL to download the raw .eml file, and a timestamp indicating when the download URL expires.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "inbox_id",
  "message_id"
 ],
 "properties": {
  "inbox_id": {
   "type": "string",
   "title": "InboxId",
   "description": "The ID of the inbox."
  },
  "message_id": {
   "type": "string",
   "title": "MessageId",
   "description": "ID of message."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "title": "RawMessageResponse",
 "required": [
  "message_id",
  "size",
  "download_url",
  "expires_at"
 ],
 "properties": {
  "size": {
   "type": "integer",
   "title": "MessageSize",
   "description": "Size of message in bytes."
  },
  "expires_at": {
   "type": "string",
   "format": "date-time",
   "description": "Time at which the download URL expires."
  },
  "message_id": {
   "type": "string",
   "title": "MessageId",
   "description": "ID of message."
  },
  "download_url": {
   "type": "string",
   "description": "S3 presigned URL to download the raw message. Expires at expires_at."
  }
 },
 "description": "S3 presigned URL to download the raw .eml file."
}
```

## More

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