---
title: "Query Events"
method: GET
path: "/v0/inboxes/{inbox_id}/metrics/events"
tags: ["InboxesMetrics"]
---

# Query Events

`GET /v0/inboxes/{inbox_id}/metrics/events`

Counts of email events (sent, delivered, bounced, etc.) over time for
the inbox. Defaults to the last 24 hours; `start` must be within the
last 90 days, and a future `end` is clamped to now. Omit `period` for
individual event counts, or set it to sum counts into buckets of that
many seconds.

**CLI:**
```bash
agentmail inboxes:metrics query --inbox-id <inbox_id>
```

## Path parameters

- `inbox_id` string, required — The ID of the inbox.

## Query parameters

- `event_types` MetricEventType[] — List of metric event types to query.
- `start` string, date-time — Start timestamp for the query.
- `end` string, date-time — End timestamp for the query.
- `period` integer — Size of each time bucket as a whole number of seconds, between 1 and 86400.
- `limit` integer — Limit on number of buckets to return.
- `descending` boolean — Sort in descending order.

## Response `200`

- QueryMetricsResponse — Metrics grouped by event type.

## Other responses

- `400`

---

[API](https://skmtc.net/agentmail-to/apis/api.md) · [All operations](https://skmtc.net/agentmail-to/apis/api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agentmail-to/api/versions/394ddcdd9c29/schema)
