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

# Daily Usage

> Daily per-meter usage timeseries, up to 90 days

Returns a day-by-day usage timeseries, optionally filtered to a single meter. Days with no usage are zero-filled. Calls to this endpoint are not metered.

<Warning>
  Requires authentication (API key or JWT).
</Warning>

## Endpoint

```bash theme={null}
GET /v2/billing/usage/daily
```

## Query Parameters

<ParamField query="from" type="string">
  Range start, `YYYY-MM-DD` (UTC, inclusive). Defaults to 6 days ago.
</ParamField>

<ParamField query="to" type="string">
  Range end, `YYYY-MM-DD` (UTC, inclusive). Defaults to today.
</ParamField>

<ParamField query="meter" type="string">
  Filter to one meter by `event_name` (e.g. `m_jobs_api_calls`).
</ParamField>

<Warning>
  * Supply **both** `from` and `to` — if only one is present, both are ignored and the default 7-day window is used.
  * Maximum range is **90 days** (`422` beyond that); `to` before `from` also returns `422`; malformed dates return `422` with `"Invalid <param>: expected YYYY-MM-DD"`.
</Warning>

## Response

<ResponseField name="stripe_customer_id" type="string | null">
  Your Stripe customer ID
</ResponseField>

<ResponseField name="from_date" type="string">
  Resolved range start (`YYYY-MM-DD`)
</ResponseField>

<ResponseField name="to_date" type="string">
  Resolved range end (`YYYY-MM-DD`)
</ResponseField>

<ResponseField name="days" type="array">
  One entry per day in the range, zero-filled

  <Expandable>
    <ResponseField name="date" type="string">
      `YYYY-MM-DD`
    </ResponseField>

    <ResponseField name="total" type="integer">
      Sum of all meter values for the day (or just the filtered meter's value when `meter` is set)
    </ResponseField>

    <ResponseField name="meters" type="object">
      Map of meter `event_name` → units used that day
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl 'https://api.hirebase.org/v2/billing/usage/daily?from=2026-08-23&to=2026-08-25&meter=m_jobs_api_calls' \
    -H 'x-api-key: YOUR_API_KEY'
  ```
</CodeGroup>

<ResponseExample>
  ```json Response theme={null}
  {
    "stripe_customer_id": "cus_XXXXXXXXXXXXX",
    "from_date": "2026-08-23",
    "to_date": "2026-08-25",
    "days": [
      { "date": "2026-08-23", "total": 0, "meters": { "m_jobs_api_calls": 0 } },
      { "date": "2026-08-24", "total": 0, "meters": { "m_jobs_api_calls": 0 } },
      { "date": "2026-08-25", "total": 3, "meters": { "m_jobs_api_calls": 3 } }
    ]
  }
  ```
</ResponseExample>
