# AgentMail Query Metrics

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

Queries time-bucketed email event metrics (sent, delivered, bounced, delayed, rejected, complained, received) over a specified time range and period

## Facts

- Endpoint: GET https://mpp.api.agentmail.to/v0/metrics?utm_source=zero.xyz
- Price: Free
- Payment: MPP
- 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-metrics-918c005f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wg02Bniu0vi_sx7E3a-VF

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-918c005f
```

Example prompt: Show me my AgentMail email metrics for the past 7 days broken down into daily buckets — I want to see counts for message.sent, message.delivered, and message.bounced events, sorted in ascending order, with up to 7 buckets.

## When to prefer this

Use this endpoint when you need aggregate, time-bucketed analytics on email event activity (sent, delivered, bounced, etc.) for AI agent inboxes managed by AgentMail. Prefer this over per-message retrieval when you need trend data, volume counts, or delivery performance monitoring across a time window rather than inspecting individual messages or threads.

## Known failure modes

- Invalid date-time format for start/end returns 422 validation error
- Invalid event_type enum value returns 422 validation error
- Missing or invalid Authorization bearer token returns 401 unauthorized
- Period value not a valid number of seconds returns 422
- Limit exceeding server maximum returns 422 or clamped result
- No data for the requested time range returns empty arrays per event type

## How this service works

Query Metrics

## Output

Returns an object keyed by event type (e.g. 'message.sent', 'message.bounced'), each containing an array of time-bucketed objects with a timestamp and count of events in that bucket over the queried period.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "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."
  },
  "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-918c005f/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)
