---
title: "Get report statistics"
method: GET
path: "/api/v1/reports/{id}/statistics"
tags: ["Reports"]
---

# Get report statistics

`GET /api/v1/reports/{id}/statistics`

## Request

- Base URL: `https://api.dmarc-examiner.com`
- URL: `https://api.dmarc-examiner.com/api/v1/reports/{id}/statistics`
- Auth: API key in header `X-API-Key`

Returns aggregated statistics for a report, grouped by country, ASN, and authentication result.

## Path parameters

- `id` string, uuid, required

## Response `200`

Report statistics

- ReportStatistics
  - `by_country` object[], required: Records aggregated by country, sorted descending by count.
    - `country_code` string, required: ISO 3166-1 alpha-2. Returns "XX" for unknown.
    - `country` string, required
    - `count` integer, required
    - `pass` integer, required
    - `fail` integer, required
    - `percentage` number, float, required: Share of total records this country represents (0–100, 1 decimal).
  - `by_asn` object[], required: Records aggregated by ASN, sorted descending by count.
    - `asn` integer, required
    - `org` string, required
    - `count` integer, required
    - `pass` integer, required
    - `fail` integer, required
    - `percentage` number, float, required
  - `by_result` object, required
    - `pass` integer, required
    - `fail` integer, required
    - `total` integer, required
    - `pass_rate` number, float, required: Percentage of records passing both DKIM and SPF (0–100, 1 decimal).

## Other responses

- `401`: Authentication failed. Two shapes are possible depending on cause: - **Invalid or revoked key** — body is `{"message": "..."}` only. - **Missing `X-API-Key` header** — body adds an `error: "unauthorized"` machine-readable code. Clients should treat both as the same outcome and read `message` for display.
- `403`: The organization's current plan does not include the feature required by this endpoint (e.g. `apiAccess`, `forensicReports`, `advancedAlerts`). Distinct from `PlanLimitExceeded` (HTTP 402), which signals a *quota* exhausted on a feature the plan does include. If a customer downgrades to Free, all `/api/v1/*` requests will start returning this response.
- `404`: Resource not found.
- `429`: Rate limit exceeded.
- `500`: Internal server error.

---

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