---
title: "Get hourly message distribution"
method: GET
path: "/v1/analytics/hourly-distribution"
tags: ["Analytics"]
---

# Get hourly message distribution

`GET /v1/analytics/hourly-distribution`

## Request

- Base URL: `https://api.samva.dev`
- URL: `https://api.samva.dev/v1/analytics/hourly-distribution`
- Auth: API key in header `x-api-key`

Returns outbound message counts over the half-open selected instant range, bucketed by organization-local hour. Empty ranges return no rows; non-empty ranges include all 24 hours.

## Query parameters

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

## Response `200`

Success

- object[]
  - `hour` string, required
  - `count` integer, required

## Other responses

- `400`: AnalyticsQueryError
- `401`: UnauthorizedError
- `403`: ForbiddenError
- `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)
