AgentMail pods > metrics API

The pods > metrics API from AgentMail — 2 operation(s) for pods > metrics.

Operations 2

GET /v0/pods/{pod_id}/metrics/events Query Events #
GET /v0/pods/{pod_id}/metrics/usage Query Usage #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/agentmail-pods-metrics-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

agentmail-pods-metrics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Reference pods > metrics API
  version: 1.0.0
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
tags:
- name: pods > metrics
paths:
  /v0/pods/{pod_id}/metrics/events:
    get:
      operationId: query-events
      summary: Query Events
      description: 'Counts of email events (sent, delivered, bounced, etc.) over time for

        the pod. Defaults to the last 24 hours; `start` must be within the last

        90 days, and a future `end` is clamped to now. Omit `period` for

        individual event counts, or set it to sum counts into buckets of that

        many seconds.


        **CLI:**

        ```bash

        agentmail pods:metrics query --pod-id <pod_id>

        ```'
      tags:
      - pods > metrics
      parameters:
      - name: pod_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_pods_PodId'
      - name: event_types
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type_metrics_MetricEventTypes'
      - name: start
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type_metrics_Start'
      - name: end
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type_metrics_End'
      - name: period
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type_metrics_Period'
      - name: limit
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type_metrics_MetricLimit'
      - name: descending
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type_metrics_Descending'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_metrics_QueryMetricsResponse'
        '400':
          description: Error response with status 400
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ValidationErrorResponse'
  /v0/pods/{pod_id}/metrics/usage:
    get:
      operationId: query-usage
      summary: Query Usage
      description: '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.'
      tags:
      - pods > metrics
      parameters:
      - name: pod_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_pods_PodId'
      - name: usage_types
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type_metrics_UsageTypes'
      - name: start
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type_metrics_Start'
      - name: end
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type_metrics_End'
      - name: period
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type_metrics_Period'
      - name: limit
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type_metrics_MetricLimit'
      - name: descending
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type_metrics_Descending'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_metrics_QueryUsageResponse'
        '400':
          description: Error response with status 400
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ValidationErrorResponse'
components:
  schemas:
    type_metrics_UsagePoint:
      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
    type_metrics_Descending:
      type: boolean
      description: Sort in descending order.
      title: Descending
    type_metrics_MetricLimit:
      type: integer
      description: Limit on number of buckets to return.
      title: MetricLimit
    type_metrics_Period:
      type: integer
      description: Size of each time bucket as a whole number of seconds, between 1 and 86400.
      title: Period
    type_metrics_QueryMetricsResponse:
      type: object
      additionalProperties:
        type: array
        items:
          $ref: '#/components/schemas/type_metrics_MetricBucket'
      description: Metrics grouped by event type.
      title: QueryMetricsResponse
    type__ErrorFix:
      type: string
      description: The concrete next action that resolves the error.
      title: ErrorFix
    type_metrics_Start:
      type: string
      format: date-time
      description: Start timestamp for the query.
      title: Start
    type__ValidationErrorResponse:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/type__ErrorName'
        code:
          $ref: '#/components/schemas/type__ErrorCode'
        message:
          $ref: '#/components/schemas/type__ErrorMessage'
        errors:
          description: Validation errors. Each entry has a path and a message identifying the invalid field.
        fix:
          $ref: '#/components/schemas/type__ErrorFix'
        docs:
          $ref: '#/components/schemas/type__ErrorDocs'
      required:
      - name
      - errors
      title: ValidationErrorResponse
    type__ErrorName:
      type: string
      description: Name of error.
      title: ErrorName
    type_metrics_UsageType:
      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`,

        `message_count`, and `thread_count`; pod-scoped queries add `inbox_count`

        and `domain_count`; organization-scoped queries add `pod_count`.'
      title: UsageType
    type__ErrorMessage:
      type: string
      description: Error message.
      title: ErrorMessage
    type_metrics_MetricBucket:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Timestamp of the bucket.
        count:
          type: integer
          description: Count of events in the bucket.
      required:
      - timestamp
      - count
      title: MetricBucket
    type_metrics_UsageTypes:
      type: array
      items:
        $ref: '#/components/schemas/type_metrics_UsageType'
      description: List of usage metric types to query. Omit to query every type valid for the scope.
      title: UsageTypes
    type__ErrorCode:
      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
    type_metrics_End:
      type: string
      format: date-time
      description: End timestamp for the query.
      title: End
    type_metrics_MetricEventTypes:
      type: array
      items:
        $ref: '#/components/schemas/type_metrics_MetricEventType'
      description: List of metric event types to query.
      title: MetricEventTypes
    type_metrics_QueryUsageResponse:
      type: object
      additionalProperties:
        type: array
        items:
          $ref: '#/components/schemas/type_metrics_UsagePoint'
      description: Cumulative usage series grouped by usage type.
      title: QueryUsageResponse
    type_metrics_MetricEventType:
      type: string
      enum:
      - message.received
      - message.received.spam
      - message.received.blocked
      - message.received.unauthenticated
      - message.sent
      - message.delivered
      - message.bounced
      - message.complained
      - message.rejected
      - domain.verified
      description: Type of metric event.
      title: MetricEventType
    type_pods_PodId:
      type: string
      description: ID of pod.
      title: PodId
    type__ErrorDocs:
      type: string
      description: Link to the error reference entry for this code.
      title: ErrorDocs
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer