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

# Daily usage

> GET /console/usage/daily/

Returns a per-day request-count breakdown for a given key environment — useful for rendering a usage trend chart. Lives on the **regular** Scanova API host (`qcg-api.scanova.io`), authenticated with your dashboard OAuth access token.

## Request

```
GET https://qcg-api.scanova.io/console/usage/daily/
Authorization: Bearer <your_oauth_access_token>
```

<ParamField query="environment" type="string" required>
  One of `sandbox`, `live`, `zapier`, `mcp`. Selects which keys' logs to aggregate.
</ParamField>

<ParamField query="days" type="integer" default="30">
  Number of trailing days to include, clamped to the range `1`–`365`.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -G "https://qcg-api.scanova.io/console/usage/daily/" \
    -H "Authorization: Bearer <your_oauth_access_token>" \
    -d environment=live \
    -d days=7
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  [
    { "date": "2026-08-10", "count": 812, "success_count": 799, "error_count": 13 },
    { "date": "2026-08-11", "count": 640, "success_count": 640, "error_count": 0 },
    { "date": "2026-08-12", "count": 0,   "success_count": 0,   "error_count": 0 },
    { "date": "2026-08-13", "count": 705, "success_count": 690, "error_count": 15 },
    { "date": "2026-08-14", "count": 918, "success_count": 918, "error_count": 0 },
    { "date": "2026-08-15", "count": 733, "success_count": 733, "error_count": 0 },
    { "date": "2026-08-16", "count": 214, "success_count": 214, "error_count": 0 }
  ]
  ```
</ResponseExample>

### Response fields

The response is an array with exactly `days` entries, one per calendar day, oldest first.

<ResponseField name="date" type="string">
  ISO 8601 date (`YYYY-MM-DD`).
</ResponseField>

<ResponseField name="count" type="integer">
  Total requests logged that day.
</ResponseField>

<ResponseField name="success_count" type="integer">
  Requests that returned a status code below `400`.
</ResponseField>

<ResponseField name="error_count" type="integer">
  Requests that returned a status code of `400` or above.
</ResponseField>

<Note>
  Days with no traffic are zero-filled rather than omitted, so the array's length is always exactly `days` and safe to chart directly without gap-filling client-side.
</Note>

## Errors

`environment` is required, same validation as [Usage statistics](/api-reference/management-api/tokens/usage-stats#errors). A non-integer `days` returns:

```json 400 Bad Request theme={null}
{ "days": ["days must be an integer."] }
```

## Related

* [Usage statistics](/api-reference/management-api/tokens/usage-stats) — the same request totals as a single rolling-window figure instead of a per-day series.
* [Usage by endpoint](/api-reference/management-api/tokens/usage-by-endpoint) — the same traffic broken out by route and method instead of by day.
* [Management API overview](/api-reference/management-api/overview) — the `environment` values (`sandbox`, `live`, `zapier`, `mcp`) this endpoint aggregates by.


## OpenAPI

````yaml api-reference/openapi/management-api.json GET /console/usage/daily/
openapi: 3.1.0
info:
  title: Scanova Management API (v2)
  description: >-
    The complete Scanova Management API — every endpoint available at
    management.scanova.io (QR codes, folders, tags, leads, forms, analytics,
    plans, shared users & roles), plus the token-creation and usage-stats
    endpoints used to authenticate against it. Every path and request/response
    shape below was verified live against a real API key and the actual running
    backend (Phase 7, 2026-08-16) — not guessed from reading urls.py alone.
  version: 2.0.0
servers:
  - url: https://management.scanova.io
    description: Management API — QR/folder/tag/lead/form/analytics/plans endpoints
security:
  - apiKeyAuth: []
paths:
  /console/usage/daily/:
    get:
      summary: Daily usage
      operationId: getDailyUsage
      parameters:
        - name: environment
          in: query
          required: true
          schema:
            type: string
        - name: days
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: Per-day usage
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Send your Management API key as the raw value of the Authorization
        header — no "Bearer " or "Token " prefix, and no other characters.
        Example: `Authorization: 401f7ac837da42b97f613d789819ff93537bee6a`. A
        header containing more than one space-separated part is rejected
        outright. Requests also require the request's Host header to be the
        management API host (e.g. management.scanova.io) — the same key sent to
        the regular API host will not authenticate.

````