---
title: "Query Rates"
method: GET
path: "/v0/inboxes/{inbox_id}/metrics/rates"
tags: ["inboxes > metrics"]
---

# Query Rates

`GET /v0/inboxes/{inbox_id}/metrics/rates`

## Request

- Base URL: `https://api.agentmail.to`
- URL: `https://api.agentmail.to/v0/inboxes/{inbox_id}/metrics/rates`
- Auth: HTTP bearer

Rolling bounce and complaint rates for the inbox. At each `period`
grid point, the bounced (or complained) messages over the preceding
`window` divided by the messages sent over the same window, with the
send count alongside. Account moderation evaluates the organization-wide
rate, so use the organization endpoint to see the number it acts on;
the inbox view shows which inboxes contribute. Defaults to the rolling
24-hour rate sampled hourly over the last day; `start` must be within
the last 90 days, `window` must be a whole multiple of `period`, and
the range plus window divided by `period` must not exceed 1000
buckets.

**CLI:**
```bash
agentmail inboxes metrics query-rates --inbox-id <inbox_id>
```

## Path parameters

- `inbox_id` string, required: The ID of the inbox.

## Query parameters

- `rate_types` MetricsRateType[]: List of rate types to query. Omit to query both.
- `start` string, date-time: Start timestamp for the query.
- `end` string, date-time: End timestamp for the query.
- `period` integer: How often a point is sampled, as a whole number of seconds between 60 and 86400. Defaults to 3600 (one point per hour).
- `window` integer: How far back each point looks, as a whole number of seconds. Must be a whole multiple of `period`, at most 30 days (2592000). Defaults to 86400 (a rolling 24-hour rate).
- `limit` integer: Limit on number of buckets to return.
- `descending` boolean: Sort in descending order.

## Response `200`

Response with status 200

- MetricsQueryRatesResponse: Rate series grouped by rate type.

## Other responses

- `400`: Error response with status 400

## Changes

- **2026-10-16** `3f5c7830c952`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agentmail-to/apis/api/changes/v0/inboxes/:inbox_id/metrics/rates/get.md)

---

[API](https://skmtc.dev/agentmail-to/apis/api.md) - [All operations](https://skmtc.dev/agentmail-to/apis/api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentmail-to/apis/api/revisions/a9792efe7bdf?raw)
