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
      • GETList Pods
      • GETGet Pod
      • POSTCreate Pod
      • DELDelete Pod
        • GETQuery Metrics
LogoLogo
contact@agentmail.ccDiscord
API ReferencePodsMetrics

Query Metrics

GET
/v0/pods/:pod_id/metrics
GET
/v0/pods/:pod_id/metrics
1from agentmail import AgentMail
2
3client = AgentMail(
4 api_key="YOUR_TOKEN_HERE",
5)
6
7client.pods.metrics.query(
8 pod_id="pod_id",
9)
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 pods:metrics query --pod-id <pod_id> ```
Was this page helpful?
Previous

List API Keys

Next
Built with

CLI:

$agentmail pods:metrics query --pod-id <pod_id>

Authentication

AuthorizationBearer

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

Path parameters

pod_idstringRequired
ID of pod.

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