# AgentMail Query Pod Metrics

> AgentMail Query Pod Metrics is a free API for AI agents from AgentMail at mpp.api.agentmail.to, Free, status unknown (last checked 2026-10-12).

Retrieves time-bucketed email event metrics (sent, delivered, bounced, etc.) for a specific AgentMail pod over a configurable time window.

## Facts

- Endpoint: GET https://mpp.api.agentmail.to/v0/pods/:pod_id/metrics?utm_source=zero.xyz
- Price: Free
- Status: unknown
- Last checked: 2026-10-12
- 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-metrics-cca73602
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7Dlyqjtp92o7HRPusAxMP

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-metrics-cca73602
```

Example prompt: Show me the email metrics for pod 'pod_abc123' over the last 7 days — I want to see message.sent, message.delivered, and message.bounced events grouped into 1-hour buckets (3600 seconds), limited to 168 results, in ascending order.

## When to prefer this

Use this endpoint when you need time-series analytics on email activity for a specific AgentMail pod — particularly for monitoring delivery health, detecting bounce spikes, auditing send volumes, or building dashboards. Prefer this over general inbox listing endpoints when you need aggregated counts over time rather than individual message details.

## Known failure modes

- Missing or invalid pod_id returns 404 Not Found
- Invalid or missing Authorization header returns 401 Unauthorized
- Invalid date-time format for start/end returns 422 Unprocessable Entity
- Unsupported event_type enum value returns 422 Unprocessable Entity
- period value of zero or negative returns 400 Bad Request
- No data in the requested range returns an empty object or empty arrays
- Rate limiting may return 429 Too Many Requests

## How this service works

Query Metrics

## Output

A JSON object keyed by event type (e.g. 'message.sent', 'message.bounced'), where each value is an array of time-bucketed metric objects containing a timestamp and a count of events in that period. This allows the agent to analyze email delivery trends, bounce rates, and engagement over time.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "pod_id"
 ],
 "properties": {
  "end": {
   "type": "string",
   "title": "End",
   "format": "date-time",
   "description": "End timestamp for the query."
  },
  "limit": {
   "type": "integer",
   "title": "MetricLimit",
   "description": "Limit on number of buckets to return."
  },
  "start": {
   "type": "string",
   "title": "Start",
   "format": "date-time",
   "description": "Start timestamp for the query."
  },
  "period": {
   "type": "string",
   "title": "Period",
   "description": "Period in number of seconds for the query."
  },
  "pod_id": {
   "type": "string",
   "title": "PodId",
   "description": "ID of pod."
  },
  "descending": {
   "type": "boolean",
   "title": "Descending",
   "description": "Sort in descending order."
  },
  "event_types": {
   "type": "array",
   "items": {
    "enum": [
     "message.sent",
     "message.delivered",
     "message.bounced",
     "message.delayed",
     "message.rejected",
     "message.complained",
     "message.received"
    ],
    "type": "string",
    "title": "MetricEventType",
    "description": "Type of metric event."
   },
   "title": "MetricEventTypes",
   "description": "List of metric event types to query."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "title": "QueryMetricsResponse",
 "description": "Metrics grouped by event type.",
 "additionalProperties": {
  "type": "array",
  "items": {
   "type": "object",
   "title": "MetricBucket",
   "required": [
    "timestamp",
    "count"
   ],
   "properties": {
    "count": {
     "type": "integer",
     "description": "Count of events in the bucket."
    },
    "timestamp": {
     "type": "string",
     "format": "date-time",
     "description": "Timestamp of the bucket."
    }
   }
  }
 }
}
```

## More

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