Skip to main content
GET
Query Metrics
Returns aggregate counters for the whole account as a flat map of counter name to an array of data points. Measured live on 2026-08-24 the keys are message.received, message.received.spam, message.received.blocked, message.received.unauthenticated, message.sent, message.delivered, message.bounced, message.complained, message.rejected, message.opened and domain.verified, each an empty array on an account with no traffic — an empty array means no activity, not an error. The shape is not pinned in this spec, so read the keys actually returned rather than assuming this list is closed. This is the organization-wide view spanning every inbox in the account. Every AIsa caller shares one AgentMail account, so this reaches inboxes other callers created; the inbox-scoped twin get_agentmail_inbox_metrics is the one to use when a single inbox is meant.

Example

First time? Point any MCP client at https://mcp.aisa.one/mcp — Claude Code, Codex, Cursor, VS Code and the rest. Authorization is OAuth: the client opens a browser, you click Allow once, and there is no key to paste. Your agent then reaches every endpoint through a few meta tools: search, list_categories, get_details and batch_quote are free, batch_use is billed per call. Setup per client is in Connect via MCP; the live tool list and what each call costs are on aisa.one/mcp.
Set this endpoint up in your agent →

Request contract

  • Method and path: GET /apis/v1/agentmail/metrics
  • Availability: enabled
  • Request URL template: https://api.aisa.one/apis/v1/agentmail/metrics
  • descending: query; optional
  • end: query; optional
  • event_types: query; optional
  • limit: query; optional
  • period: query; optional
  • start: query; optional
  • Runtime facts: 18a04e28941fae19674c11246b677373368b6bd927b7c146220cec1f168f4639
Complete OpenAPI definition Effective request and pricing declaration (including authentication and referenced schemas):

Cost and request rules

Published reference price: $0.012 USD per successful request. Account-specific pricing and final settlement may differ. Published reference values are not an account-specific quote or a settled charge. For endpoints supporting X-AISA-Cost-Mode: quote, obtain a free quote for your exact request before execution; reconcile the settled cost with response metadata and Usage Logs. USD amounts use 1,000,000 integer micro-USD per dollar.
  • Default request reference estimate (USD): 0.012
  • Cost contract: explicit_zero
  • Settlement evidence source: request_snapshot

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

descending
boolean

Sort in descending order.

end
string<date-time>

End timestamp for the query.

event_types
enum<string>[]

List of metric event types to query.

Type of metric event.

Available options:
message.sent,
message.delivered,
message.bounced,
message.delayed,
message.rejected,
message.complained,
message.received
limit
integer

Limit on number of buckets to return.

period
string

Period in number of seconds for the query.

start
string<date-time>

Start timestamp for the query.

Response

Response with status 200

Metrics grouped by event type.

{key}
MetricBucket · object[]