# Metrics

> Every metrics endpoint, generated from the API's own schemas.

Base URL `https://pidgeon.ai/api/v1`. Every request carries `Authorization: Bearer pgn_live_…`. The machine-readable version of this page is https://pidgeon.ai/openapi.json.

## GET /metrics

What happened to the mail

Counted from the event log rather than from the messages: a message row says what was sent, and whether it bounced is something the provider told us afterwards. `identity_id` narrows it to one mailbox, which is the question worth asking when you run several — reputation belongs to the address that sent the mail. `pod_id` narrows it to one pod, which is the question a platform asks: sending reputation is isolated per pod, so this is the scope that isolation is claimed at, and the response carries `reputation.sending` — `paused` is the provider having suspended that pod and nobody else. `delivery_rate` is null rather than zero when nothing was sent. An unknown parameter is refused rather than ignored.

**Parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `days` | number | no |  |
| `identity_id` | uuid | no |  |
| `pod_id` | uuid | no |  |

**Responses**

- `200` The window.
- `400` The request is not valid. `error.field` names the input at fault when there is one.
- `401` No API key, or one that is not valid.
- `403` Refused. `error.code` says why: `forbidden` when this key may not do this or the account is on hold, `abuse_blocked` when a limit says no.
- `404` No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
- `409` It conflicts with what is there: it already exists, or the `etag` you sent is not the current one.
- `429` Rate limited. `X-RateLimit-Reset` says when to retry.
- `500` Something went wrong on our side. Retry; if it keeps happening, tell us.
- `503` Something this needs is not answering right now. Retry in a moment.
