---
title: "Get webhook delivery statistics"
method: GET
path: "/v1/webhooks/{id}/stats"
tags: ["Webhooks"]
---

# Get webhook delivery statistics

`GET /v1/webhooks/{id}/stats`

## Request

- Base URL: `https://api.samva.dev`
- URL: `https://api.samva.dev/v1/webhooks/{id}/stats`
- Auth: API key in header `x-api-key`

Returns aggregate pending, delivered, exhausted, and cancelled delivery counts for a webhook endpoint over its whole retained history, plus the same counts per organization-local calendar day between `after` and `before`, a window of at most 90 days that defaults to the last 30 days. Deliveries are retained for 90 days, so the longest window is the whole history.

## Path parameters

- `id` string, required

## Query parameters

- `after` string, nullable
- `before` string, nullable

## Response `200`

WebhookStatsResponse

- WebhookStatsResponse
  - `total` integer, required
  - `pending` integer, required
  - `delivered` integer, required
  - `exhausted` integer, required
  - `cancelled` integer, required
  - `daily` WebhookDailyDeliveries[], required
    - `date` string, required
    - `pending` integer, required
    - `delivered` integer, required
    - `exhausted` integer, required
    - `cancelled` integer, required

## Other responses

- `401`: UnauthorizedError
- `403`: ForbiddenError
- `404`: ResourceNotFoundError
- `422`: ValidationError
- `500`: InternalError
- `504`: GatewayTimeoutError

---

[API](https://skmtc.dev/samva/apis/samva-api.md) · [All operations](https://skmtc.dev/samva/apis/samva-api/llms.txt) · [OpenAPI document](https://skmtc.dev/samva/apis/samva-api/revisions/a99408542cc3?raw)
