> ## Documentation Index
> Fetch the complete documentation index at: https://agentmail.manicule.dev/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://agentmail.manicule.dev/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://agentmail.manicule.dev/api/mcp.
> Every agent surface: https://agentmail.manicule.dev/.well-known/llms-manifest.json

# Query Rates (/api-reference/query-rates)

<!-- agent-signals: reading_time_min: 3 · est_tokens: 1731 · updated: 2026-09-29 -->
Related: [Sign Up](/api-reference/sign-up.md), [Attach Human](/api-reference/attach-human.md), [Verify](/api-reference/verify.md), [List Inboxes](/api-reference/list-inboxes.md), [Create Inbox](/api-reference/create-inbox.md), [Search Inboxes](/api-reference/search-inboxes.md)

# Query Rates

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

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

Base URL: `https://api.agentmail.to`

Base URL: `https://x402.api.agentmail.to`

Base URL: `https://mpp.api.agentmail.to`

Base URL: `https://api.agentmail.eu`

## OpenAPI

```json
{
  "servers": [
    {
      "url": "https://api.agentmail.to",
      "description": "prod"
    },
    {
      "url": "https://x402.api.agentmail.to",
      "description": "prod-x402"
    },
    {
      "url": "https://mpp.api.agentmail.to",
      "description": "prod-mpp"
    },
    {
      "url": "https://api.agentmail.eu",
      "description": "eu-prod"
    }
  ],
  "security": [
    {
      "Bearer": []
    }
  ],
  "securitySchemes": {
    "Bearer": {
      "type": "http",
      "scheme": "bearer"
    }
  },
  "parameters": [
    {
      "name": "inbox_id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "description": "The ID of the inbox.",
        "title": "InboxId"
      }
    },
    {
      "name": "rate_types",
      "in": "query",
      "required": false,
      "schema": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "bounce",
            "complaint"
          ],
          "description": "Type of rate. `bounce` is bounced messages divided by messages sent,\ncounting permanent and transient bounces; `complaint` is spam complaints\ndivided by messages sent.",
          "title": "RateType"
        },
        "description": "List of rate types to query. Omit to query both.",
        "title": "RateTypes"
      }
    },
    {
      "name": "start",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string",
        "format": "date-time",
        "description": "Start timestamp for the query.",
        "title": "Start"
      }
    },
    {
      "name": "end",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string",
        "format": "date-time",
        "description": "End timestamp for the query.",
        "title": "End"
      }
    },
    {
      "name": "period",
      "in": "query",
      "required": false,
      "schema": {
        "type": "integer",
        "description": "How often a point is sampled, as a whole number of seconds between 60\nand 86400. Defaults to 3600 (one point per hour).",
        "title": "RatePeriod"
      }
    },
    {
      "name": "window",
      "in": "query",
      "required": false,
      "schema": {
        "type": "integer",
        "description": "How far back each point looks, as a whole number of seconds. Must be a\nwhole multiple of `period`, at most 30 days (2592000). Defaults to 86400\n(a rolling 24-hour rate).",
        "title": "Window"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
        "type": "integer",
        "description": "Limit on number of buckets to return.",
        "title": "MetricLimit"
      }
    },
    {
      "name": "descending",
      "in": "query",
      "required": false,
      "schema": {
        "type": "boolean",
        "description": "Sort in descending order.",
        "title": "Descending"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Response with status 200",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "timestamp": {
                    "type": "string",
                    "format": "date-time",
                    "description": "End of the window the point covers; the window is the `window` seconds before it."
                  },
                  "rate": {
                    "type": "number",
                    "format": "double",
                    "description": "Bounced or complained messages divided by messages sent over the\nwindow, as a fraction (0.05 is 5%). Null when nothing was sent in\nthe window."
                  },
                  "sent": {
                    "type": "integer",
                    "description": "Messages sent in the window, counted per recipient."
                  }
                },
                "required": [
                  "timestamp",
                  "sent"
                ],
                "title": "RatePoint"
              }
            },
            "description": "Rate series grouped by rate type.",
            "title": "QueryRatesResponse"
          }
        }
      }
    },
    "400": {
      "description": "Error response with status 400",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Name of error.",
                "title": "ErrorName"
              },
              "code": {
                "type": "string",
                "description": "Stable, machine-readable error code in snake_case (for example, not_found or missing_permission). Branch on this rather than the message text.",
                "title": "ErrorCode"
              },
              "message": {
                "type": "string",
                "description": "Error message.",
                "title": "ErrorMessage"
              },
              "errors": {
                "description": "Validation errors. Each entry has a path and a message identifying the invalid field."
              },
              "fix": {
                "type": "string",
                "description": "The concrete next action that resolves the error.",
                "title": "ErrorFix"
              },
              "docs": {
                "type": "string",
                "description": "Link to the error reference entry for this code.",
                "title": "ErrorDocs"
              }
            },
            "required": [
              "name",
              "errors"
            ],
            "title": "ValidationErrorResponse"
          }
        }
      }
    }
  }
}
```
