---
title: "Received mail per hour"
method: GET
path: "/stats/emails/hourly"
tags: ["Stats"]
---

# Received mail per hour

`GET /stats/emails/hourly`

## Request

- Base URL: `https://api.primitive.dev/v1`
- URL: `https://api.primitive.dev/v1/stats/emails/hourly`
- Auth: HTTP bearer

Received mail per UTC hour over the last `days` days, by outcome: accepted, failing (every webhook delivery so far failed) and rejected. Hours with no mail are left out. Needs mail:read. Counts only the mail the credential may read: a credential narrowed to some addresses counts the mail its scope admits.

## Query parameters

- `days` integer: How many days back, from 1 to 31; defaults to 8.

## Response `200`

Received mail per hour

- object
  - `success` true, required
  - `data` object[], required
    - `hour` string, date-time, required
    - `accepted` integer, required
    - `failing` integer, required
    - `rejected` integer, required

## Other responses

- `400`: Invalid request parameters
- `401`: Invalid or missing API key
- `403`: Authenticated caller lacks permission for the operation
- `429`: Rate limit exceeded. The `ratelimit-*` headers describe the limiter that rejected this request, with its own limit and window, not the API budget that successful responses report. A limiter that reports only a wait sends `Retry-After` alone.

---

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