> ## 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 Usage (/api-reference/query-usage-3)

<!-- agent-signals: reading_time_min: 3 · est_tokens: 1521 · 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 Usage

`GET /v0/pods/{pod_id}/metrics/usage`

> Cumulative usage series for the pod. Each point is the running total of
> the usage type at that timestamp, not the change within the bucket.
> Pod-scoped queries carry every usage type except `pod_count`; requested
> types that don't apply to the scope are ignored. Defaults to the last
> 24 hours; `start` must be within the last 90 days, and a future `end`
> is clamped to now. The range divided by `period` must not exceed 1000
> buckets.

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": "pod_id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "description": "ID of pod.",
        "title": "PodId"
      }
    },
    {
      "name": "usage_types",
      "in": "query",
      "required": false,
      "schema": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "storage_bytes",
            "message_count",
            "thread_count",
            "inbox_count",
            "pod_count",
            "domain_count"
          ],
          "description": "Type of usage metric. Inbox-scoped queries carry `storage_bytes`,\n`message_count`, and `thread_count`; pod-scoped queries add `inbox_count`\nand `domain_count`; organization-scoped queries add `pod_count`.",
          "title": "UsageType"
        },
        "description": "List of usage metric types to query. Omit to query every type valid for the scope.",
        "title": "UsageTypes"
      }
    },
    {
      "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": "Size of each time bucket as a whole number of seconds, between 1 and 86400.",
        "title": "Period"
      }
    },
    {
      "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": "Timestamp of the point."
                  },
                  "value": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Cumulative value of the usage metric at the timestamp."
                  }
                },
                "required": [
                  "timestamp",
                  "value"
                ],
                "title": "UsagePoint"
              }
            },
            "description": "Cumulative usage series grouped by usage type.",
            "title": "QueryUsageResponse"
          }
        }
      }
    },
    "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"
          }
        }
      }
    }
  }
}
```
