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

# Get analytics

> Get time-series usage analytics and status code breakdown.

Returns daily message send volume, API request volume, and HTTP status code distribution over a trailing window.

<ParamField query="days" type="number">
  Number of trailing days to analyze. Defaults to `7`, maximum `90`.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://core.wadial.com/api/v1/usage/analytics?days=7" \
    -H "Authorization: Bearer $WADIAL_API_KEY"
  ```

  ```js JavaScript theme={null}
  const response = await fetch("https://core.wadial.com/api/v1/usage/analytics?days=7", {
    headers: { Authorization: `Bearer ${process.env.WADIAL_API_KEY}` },
  });
  const { data } = await response.json();
  ```

  ```python Python theme={null}
  import os, requests

  response = requests.get(
      "https://core.wadial.com/api/v1/usage/analytics",
      headers={"Authorization": f"Bearer {os.environ['WADIAL_API_KEY']}"},
      params={"days": 7},
  )
  data = response.json()["data"]
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "data": {
      "periodDays": 7,
      "timeline": [
        {
          "date": "2026-07-29",
          "sentMessages": 42,
          "failedMessages": 0,
          "apiRequests": 180
        },
        {
          "date": "2026-07-30",
          "sentMessages": 88,
          "failedMessages": 1,
          "apiRequests": 310
        }
      ],
      "statusBreakdown": {
        "success2xx": 480,
        "clientError4xx": 10,
        "serverError5xx": 0
      }
    }
  }
  ```
</ResponseExample>
