# Mermail Email Context Retrieval

> Mermail Email Context Retrieval is a paid API for AI agents from console.mermail.app, paid per call via x402, price unknown, status unknown (last checked 2026-10-11).

Retrieves a specific email and its full thread context from an agent's Mermail mailbox

## Facts

- Endpoint: GET https://console.mermail.app/api/agent/v1/mailboxes/%7BmailboxId%7D/emails/%7BemailId%7D/context?utm_source=zero.xyz
- Price: price unknown
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mermail-email-context-retrieval-c07f1995
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_A-iXZpv93WwGSiLPYM7f1

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 mermail-email-context-retrieval-c07f1995
```

Example prompt: Pull up email email_1 from my Mermail mailbox mailbox_42 and show me the full thread context, including all previous messages in that conversation.

## When to prefer this

Use this endpoint when your agent needs to read a specific email AND its full conversation thread context — for example, before drafting a reply to a customer, following up on a sales lead, or processing a verification code. Prefer this over a list endpoint when you already have a specific emailId and need full message body and thread history.

## Known failure modes

- Invalid or non-existent mailboxId returns a 404 not found error
- Invalid or non-existent emailId returns a 404 not found error
- Unauthorized access returns a 401 or 403 if the agent lacks permission for the mailbox
- Malformed cursor parameter causes a 400 bad request
- Email content may be omitted (content_omitted: true) if flagged or scan_status is not clean

## How this service works

An inbox and wallet for your AI agent. Find and nurture sales leads, resolve customer support, and handle online purchases with controlled payments.

## Output

Returns a JSON object with two keys: 'email' (the specific message with id, subject, sender, recipient, date, body, snippet, read status, thread_id, scan_status, and content_omitted flag) and 'thread' (the full conversation thread including all messages, total count, has_more flag, and next_cursor for pagination).

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "limit": {
       "type": "integer",
       "maximum": 50,
       "minimum": 1
      },
      "cursor": {
       "type": "string",
       "maxLength": 2048
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "email",
      "thread"
     ],
     "properties": {
      "email": {
       "type": "object",
       "required": [
        "id",
        "subject",
        "sender",
        "recipient",
        "date"
       ],
       "properties": {
        "id": {
         "type": "string"
        },
        "body": {
         "type": "string"
        },
        "date": {
         "type": "string",
         "format": "date-time"
        },
        "read": {
         "type": "boolean"
        },
        "sender": {
         "type": "string"
        },
        "snippet": {
         "type": "string"
        },
        "subject": {
         "type": "string"
        },
        "recipient": {
         "type": "string"
        },
        "thread_id": {
         "type": [
          "string",
          "null"
         ]
        },
        "scan_status": {
         "enum": [
          "clean",
          "flagged",
          "skipped",
          null
         ],
         "type": [
          "string",
          "null"
         ]
        },
        "content_omitted": {
         "type": "boolean"
        }
       },
       "additionalProperties": true
      },
      "thread": {
       "type": "object",
       "required": [
        "id",
        "messages",
        "total_count",
        "has_more",
        "next_cursor"
       ],
       "properties": {
        "id": {
         "type": "string"
        },
        "has_more": {
         "type": "boolean"
        },
    
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "email": {
   "id": "email_1",
   "date": "2026-09-20T00:00:00.000Z",
   "sender": "noreply@example.com",
   "subject": "Verification code",
   "recipient": "agent@mermail.app",
   "scan_status": "clean"
  },
  "thread": {
   "id": "thread_1",
   "has_more": false,
   "messages": [
    {
     "id": "email_1",
     "date": "2026-09-20T00:00:00.000Z",
     "sender": "noreply@example.com",
     "subject": "Verification code",
     "recipient": "agent@mermail.app",
     "scan_status": "clean"
    }
   ],
   "next_cursor": null,
   "total_count": 1
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mermail-email-context-retrieval-c07f1995/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from console.mermail.app](https://www.zero.xyz/host/console.mermail.app/llms.txt)
