# Per-day consumption and the credit ledger

> GET /usage. HeyRik API parameters and documented request and response examples.

Source: https://www.heyrik.com/docs/api-reference/account/get-usage-per-day-consumption-and-the-credit-ledger

GET https://server.heyrik.com/api/v1/usage

## Headers

Authorization: Bearer $HEYRIK_API_KEY (required). Keep your key on your server.

## Parameters

- days (number): Window size. Default 30.
- from (string): ISO start date (use with until).
- until (string): ISO end date.

## Request example

```sh
curl "https://server.heyrik.com/api/v1/usage?days=30" \
  -H "Authorization: Bearer $HEYRIK_API_KEY"
```

## Response example

```json
{
  "data": {
    "period": { "credits_used": 218.267, "minutes": 54.5, "calls": 83 },
    "by_day": [
      { "date": "2026-07-22", "credits": 12.45, "minutes": 3.1, "calls": 5 }
    ],
    "credits_per_minute": 4,
    "records": [
      {
        "kind": "call",
        "credits": 2.9167,
        "seconds": 37,
        "note": "call 37s — 2.4667 platform + 0.45 carrier"
      }
    ]
  }
}
```
