Query Rates

Rolling bounce and complaint rates for the organization. At each `period` grid point, the bounced (or complained) messages over the preceding `window` divided by the messages sent over the same window, with the send count alongside so you can see the volume behind it. This is the number AgentMail's account moderation acts on: a warning at a 5% bounce rate and suspension at 10%, evaluated over a rolling 24 hours once at least 1,000 messages were sent in that window. Defaults to the rolling 24-hour rate sampled hourly over the last day; `start` must be within the last 90 days, `window` must be a whole multiple of `period`, and the range plus window divided by `period` must not exceed 1000 buckets. **CLI:** ```bash agentmail metrics query-rates ```

Authentication

AuthorizationBearer

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

Query parameters

rate_typeslist of enumsOptional
List of rate types to query. Omit to query both.
Allowed values:
startdatetimeOptional
Start timestamp for the query.
enddatetimeOptional
End timestamp for the query.
periodintegerOptional

How often a point is sampled, as a whole number of seconds between 60 and 86400. Defaults to 3600 (one point per hour).

windowintegerOptional

How far back each point looks, as a whole number of seconds. Must be a whole multiple of period, at most 30 days (2592000). Defaults to 86400 (a rolling 24-hour rate).

limitintegerOptional
Limit on number of buckets to return.
descendingbooleanOptional
Sort in descending order.

Response

This endpoint returns a map from enums to lists of objects.
Allowed values:
timestampdatetime

End of the window the point covers; the window is the window seconds before it.

sentinteger
Messages sent in the window, counted per recipient.
ratedoubleOptional

Bounced or complained messages divided by messages sent over the window, as a fraction (0.05 is 5%). Null when nothing was sent in the window.

Errors

400
Validation Error