# AgentMail Inbox Metrics Query

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

Query time-series metrics for email events (sent, delivered, bounced, etc.) on a specific AgentMail inbox, grouped into configurable time buckets.

## Facts

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

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-cecddeab
```

Example prompt: Show me the email delivery metrics for AgentMail inbox 'inbox_abc123' from January 1st to January 31st, broken into daily buckets, for message.sent and message.bounced events.

## When to prefer this

Use this endpoint when you need time-series analytics on email activity for a specific AgentMail inbox — ideal for monitoring delivery health, detecting bounce spikes, or auditing message volume over a custom time window. Prefer this over general inbox listing endpoints when the goal is aggregated counts and trends rather than individual message details.

## Known failure modes

- Invalid inbox_id returns 404 not found
- Missing or invalid Authorization header returns 401 unauthorized
- Invalid date-time format for start/end returns 422 validation error
- Invalid event_type enum value returns 422 validation error
- Period value not a valid integer string returns 422 validation error
- No data in 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 mapping to an array of time-bucketed objects containing a timestamp and count of events in that bucket.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "inbox_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."
  },
  "inbox_id": {
   "type": "string",
   "title": "InboxId",
   "description": "The ID of the inbox."
  },
  "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-cecddeab/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)
