Skip to main content
GET
Query Inbox Metrics
Returns the same aggregate counters as get_agentmail_metrics but for one inbox: a flat map of counter name to an array of data points, keyed by 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. An empty array means no activity, not an error. The shape is not pinned in this spec, so read the keys actually returned. For individual events rather than counts use get_agentmail_inbox_events; for the account-wide totals, get_agentmail_metrics.

Example

Authorizations

Authorization
string
header
required

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

Headers

Authorization
string
required

Bearer authentication

Path Parameters

inbox_id
string
required

The ID of the inbox.

Query Parameters

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
start
string<date-time>

Start timestamp for the query.

end
string<date-time>

End timestamp for the query.

period
string

Period in number of seconds for the query.

limit
integer

Limit on number of buckets to return.

descending
boolean

Sort in descending order.

Response

Response with status 200

Metrics grouped by event type.

{key}
MetricBucket · object[]