---
title: "Get delivery metrics"
method: GET
path: "/webhooks/metrics"
tags: ["webhooks"]
---

# Get delivery metrics

`GET /webhooks/metrics`

## Request

- Base URL: `/api/v1` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/v1/webhooks/metrics`
- Auth: API key in header `X-Axilio-Api-Key`
- TypeScript: <https://skmtc.dev/axilioai/apis/axilio-api/docs/webhooks/metrics/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns delivery volume, error rate and destination response time over a window as points: one per hour or day in time_zone, for every destination together, one (endpoint_id), or each one (group_by=endpoint_id). Counts are zero and latencies null for a bucket with no attempts. The window defaults to the last 7 days and may start at most a year back; hour buckets need a window of 7 days or less.

## Query parameters

- `period_start_at` string, date-time: Start of the window (RFC 3339). Defaults to 7 days before period_end_at, and may be at most a year before now.
- `period_end_at` string, date-time: End of the window (RFC 3339). Defaults to now, and a later time is read as now.
- `granularity` 'hour' | 'day': Bucket size: hour or day. hour is allowed for windows of 7 days or less.
- `time_zone` string: IANA time zone the buckets follow, such as America/Los_Angeles: a day starts at local midnight and an hour on the local hour. An unknown name is an error.
- `group_by` 'endpoint_id': Split each bucket by destination, one series per destination that had attempts (the list-view sparklines). Omit for one point per bucket.
- `endpoint_id` string: Only this destination's attempts.

## Response `200`

OK

- WebhookDeliveryMetricsResponse: Delivery-attempt metrics: volume, error rate and response time over the requested window.
  - `$schema` string, uri: A URL to the JSON Schema for this object.
  - `points` WebhookDeliveryMetricPoint[], nullable, required: One point per bucket, oldest first, and per destination within a bucket when grouped. The first bucket starts at or before period_start_at.
    - `avg_latency_ms` number, double, nullable, required: Mean destination response time in the bucket, in milliseconds. Null when no attempt in the bucket recorded a latency.
    - `endpoint_id` string: The destination. Set only with group_by=endpoint_id.
    - `error_rate` number, double, required: Failed over total in the bucket, from 0 to 1. 0 when there were no attempts.
    - `failed` integer, required: Failed-attempt count in the bucket.
    - `p50_latency_ms` number, double, nullable, required: Median destination response time in the bucket, in milliseconds. Null when no attempt recorded a latency. Outside UTC, a day's percentiles (and an hour's, in a zone off the hour) are estimated from the hours in it.
    - `p95_latency_ms` number, double, nullable, required: 95th-percentile destination response time in the bucket, in milliseconds. Null when no attempt recorded a latency. Estimated like p50_latency_ms.
    - `p99_latency_ms` number, double, nullable, required: 99th-percentile destination response time in the bucket, in milliseconds. Null when no attempt recorded a latency. Estimated like p50_latency_ms.
    - `period_start_at` string, date-time, required: Start of the bucket (RFC 3339, UTC): a local hour or a local midnight in time_zone.
    - `total` integer, required: Delivery-attempt count in the bucket.

## Other responses

- `400`: Bad Request
- `422`: Unprocessable Entity
- `500`: Internal Server Error

## Changes

- **2026-10-23** `49b1da5a7974`: 2 warning, 9 info
  - deleted the `query` request parameter `range`
  - removed the optional property `points/items/time_bucket` from the response with the `200` status
  - added the new optional `query` request parameter `granularity`
  - added the new optional `query` request parameter `group_by`
  - …7 more
- **2026-09-27** `7abfd1e84b24`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/axilioai/apis/axilio-api/changes/webhooks/metrics/get.md)

---

[API](https://skmtc.dev/axilioai/apis/axilio-api.md) - [All operations](https://skmtc.dev/axilioai/apis/axilio-api/llms.txt) - [OpenAPI document](https://skmtc.dev/axilioai/apis/axilio-api/revisions/80de09d0e643?raw)
