# AgentMail: Query Metrics

> AgentMail: Query Metrics is a free API for AI agents from x402.api.agentmail.to, callable via x402, Free, status unknown (last checked 2026-09-15).

Retrieves usage and performance metrics for the AgentMail organization account

## Facts

- Endpoint: GET https://x402.api.agentmail.to/v0/metrics
- Price: Free
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentmail-bba5a298
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_E8AMIIaUt9bjjxky8nAIq

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

Example prompt: Can you pull up the current usage metrics for my AgentMail account so I can see how much activity has been going through it?

## When to prefer this

Use this endpoint when you need a high-level summary of AgentMail activity, usage volumes, or performance statistics at the organization level. Prefer this over listing individual inboxes or threads when you want aggregate counts rather than item-level data.

## Known failure modes

- 401 Unauthorized if authentication credentials are missing or invalid
- 402 Payment Required if x402 payment is not satisfied
- 404 Not Found if the organization or metrics endpoint is unavailable
- 500 Internal Server Error if the metrics service is temporarily unavailable
- Empty or zero metrics if the account has no activity yet

## How this service works

Query Metrics

## Output

A JSON object containing AgentMail organization-level metrics such as email volumes, API usage counts, or activity statistics for the account.

## 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-bba5a298/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.api.agentmail.to](https://www.zero.xyz/host/x402.api.agentmail.to/llms.txt)
