inboxes > metrics

Cumulative usage series for the inbox. Each point is the running total of the usage type at that timestamp, not the change within the bucket. Inbox-scoped queries carry storage_bytes, message_count, and thread_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.

get/v0/inboxes/{inbox_id}/metrics/usage

Request

  • Base URL
    https://api.agentmail.to
  • URL
    https://api.agentmail.to/v0/inboxes/{inbox_id}/metrics/usage
  • Auth
    HTTP bearer

Path parameters

inbox_idstring required

The ID of the inbox.

Query parameters

usage_typesMetricsUsageType[]

List of usage metric types to query. Omit to query every type valid for the scope.

startstring date-time

Start timestamp for the query.

endstring date-time

End timestamp for the query.

periodinteger

Size of each time bucket as a whole number of seconds, between 1 and 86400.

limitinteger

Limit on number of buckets to return.

descendingboolean

Sort in descending order.

Response

Response with status 200

MetricsQueryUsageResponse required

Cumulative usage series grouped by usage type.

Changes

    • info

      the endpoint scheme security Bearer was added to the API

    • info

      the endpoint scheme security BearerAuth was removed from the API

    • info

      api tag inboxes > metrics added

    • info

      api tag InboxesMetrics removed

    • info

      endpoint added