---
title: "Get API key send statistics"
method: GET
path: "/v1/api-keys/{id}/stats"
tags: ["API Keys"]
---

# Get API key send statistics

`GET /v1/api-keys/{id}/stats`

## Request

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

Returns aggregate send counts and daily volume attributed to an API key between `after` and `before`, a window of at most 90 days that defaults to the last 30 days.

## Path parameters

- `id` string, required

## Query parameters

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

## Response `200`

Success

- object
  - `totalRequests` integer, required
  - `successfulRequests` integer, required
  - `failedRequests` integer, required
  - `dailyVolume` object[], required
    - `date` string, required
    - `requests` 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)
