> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pilotstatus.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /v1/analytics/dashboard — Analytics

> Retrieve dashboard KPIs and daily message series, scoped to the API key's number.

This endpoint returns the same data shown in the dashboard (KPIs and daily series), already scoped to the API key's number.

## Endpoint

`GET https://pilotstatus.com.br/v1/analytics/dashboard`

## Query parameters

<ParamField query="period" default="30d" type="string">
  Reporting window. One of `7d`, `30d` (default), or `90d`.
</ParamField>

<ParamField query="tz" type="string">
  Optional IANA timezone, e.g. `America/Sao_Paulo`. `timezone` is accepted as an alias of `tz`.
</ParamField>

## Example

<CodeGroup>
  ```bash cURL (x-api-key) theme={null}
  curl "https://pilotstatus.com.br/v1/analytics/dashboard?tz=America/Sao_Paulo" \
    -H "x-api-key: ps_your_key_here"
  ```

  ```bash cURL (x-api-key-id) theme={null}
  curl "https://pilotstatus.com.br/v1/analytics/dashboard?tz=America/Sao_Paulo" \
    -H "x-api-key-id: ck_xxx"
  ```

  ```json Response (200) theme={null}
  {
    "totalSent": 120,
    "totalFailed": 3,
    "sentPercentChange": 0,
    "failedPercentChange": 0,
    "failureRate": 2.44,
    "dailyMessages": [
      { "date": "2026-02-24", "count": 10 },
      { "date": "2026-02-25", "count": 40 }
    ],
    "statusDistribution": {
      "queued": 10.0,
      "sent": 80.0,
      "failed": 2.5,
      "read": 7.5
    }
  }
  ```
</CodeGroup>

## Common errors

* `401` — missing/invalid API key header (`x-api-key`/`x-api-key-id`).
* `403` — a tenant-scoped key was used on this number-scoped endpoint (`code: "TENANT_SCOPE_NOT_ALLOWED"`).
