{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/generect-com/json-schema/generect-com-account-token-analytics-response-schema.json",
  "title": "AccountTokenAnalyticsResponse",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/generect-com-openapi.yaml#/components/schemas/AccountTokenAnalyticsResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "period": {
          "type": "object",
          "description": "Reporting window the counts were taken over. Timestamps are ISO-8601 but carry no UTC offset when explicit `start_date` / `end_date` were supplied, so parse them leniently rather than as strict RFC 3339.",
          "properties": {
            "start": {
              "type": "string"
            },
            "end": {
              "type": "string"
            }
          }
        },
        "total_requests": {
          "type": "integer",
          "description": "Requests across every token in the window."
        },
        "tokens": {
          "type": "array",
          "description": "One entry per token owned by the account, newest token first. A token with no traffic in the window is still listed, with zero counts.",
          "items": {
            "type": "object",
            "properties": {
              "token": {
                "type": "string"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Label given to the token when it was created. `null` for a token created without one."
              },
              "client_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "End-client identifier attached to the token."
              },
              "is_active": {
                "type": "boolean",
                "description": "Whether the token can still authenticate. A revoked token keeps its historical counts."
              },
              "created_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO-8601, without a UTC offset."
              },
              "total_requests": {
                "type": "integer"
              },
              "by_endpoint": {
                "type": "object",
                "description": "Request count keyed by the path that was called.",
                "additionalProperties": {
                  "type": "integer"
                }
              },
              "by_status": {
                "type": "object",
                "description": "Request count keyed by HTTP status class, for example `2xx`, `4xx` or `5xx`.",
                "additionalProperties": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    }
  }
}