For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
contact@agentmail.ccDiscord
DocumentationAPI ReferenceKnowledge BaseChangelog
DocumentationAPI ReferenceKnowledge BaseChangelog
  • API Reference
      • GETQuery Metrics
LogoLogo
contact@agentmail.ccDiscord
API ReferenceMetrics

Query Metrics

GET
/v0/metrics
GET
/v0/metrics
1from agentmail import AgentMail
2
3client = AgentMail(
4 api_key="YOUR_TOKEN_HERE",
5)
6
7client.metrics.query()
1{
2 "message.sent": [
3 {
4 "timestamp": "2024-01-15T09:30:00Z",
5 "count": 1
6 },
7 {
8 "timestamp": "2024-01-15T09:30:00Z",
9 "count": 1
10 }
11 ]
12}
**CLI:** ```bash agentmail metrics list ```
Was this page helpful?
Previous

List API Keys

Next
Built with

CLI:

$agentmail metrics list

Authentication

AuthorizationBearer

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

Query parameters

event_typeslist of enumsOptional
List of metric event types to query.
startdatetimeOptional
Start timestamp for the query.
enddatetimeOptional
End timestamp for the query.
periodstringOptional
Period in number of seconds for the query.
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.
timestampdatetime
Timestamp of the bucket.
countinteger
Count of events in the bucket.

Errors

400
Validation Error