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

# List your API key metadata



## OpenAPI

````yaml /api-reference/openapi.json get /v1/api-keys
openapi: 3.0.3
info:
  title: VoltView API
  description: >-
    The VoltView API provides comprehensive energy monitoring and management
    capabilities for multi-site businesses, enabling real-time tracking of
    energy consumption, cost analysis, and environmental impact metrics.


    Our API suite includes:

    - Site Management API - Manage and monitor multiple site locations

    - Energy Consumption API - Access detailed energy usage data

    - Cost Analysis API - Track and analyse energy costs

    - Environmental Metrics API - Monitor carbon emissions and energy efficiency

    - Bill Validation API - Validate and audit utility bills for accuracy

    - Supplier Integration API - Integrate with utility suppliers for automated
    data collection


    ## Getting started guide


    To start using the VoltView API, you need to:


    - Sign up for a VoltView account to receive your API credentials

    - Review our data granularity options (hourly/daily/monthly)

    - Ensure your requests are sent via HTTPS

    - All responses are returned in JSON format


    ## Authentication


    Include your VoltView API key in the `x-api-key` header on every request.


    ### Authentication error response

    If authentication fails, you will receive an HTTP 401 Unauthorised response
    with a detailed error message in the JSON response body.


    ## Data Units

    - Energy Consumption: kWh

    - Power Demand: kW

    - Carbon Emissions: kg CO2e/tonnes CO2e

    - Currency: GBP (£)

    - Time Series: ISO 8601 format

    - Numeric Values: Rounded to 2 decimal places


    Scoped keys created in Settings → API keys are read-only and restricted to
    selected sites and documented GET routes. Legacy keys keep their existing
    restrictions. Management endpoints require a signed-in Bearer JWT. See
    /api-keys and /mcp for lifecycle and pilot guidance.
  version: 1.0.0
  contact:
    email: info@voltview.co.uk
  license:
    name: Proprietary
servers:
  - url: https://api.voltview.co.uk
    description: Production server
security:
  - apiKeyAuth: []
tags:
  - name: Authentication
    description: Endpoints for authentication
  - name: User
    description: User profile management
  - name: Sites
    description: Multi-site management endpoints
  - name: On-site assets
    description: >-
      Read-only solar generation and battery data from the inverter or installer
      portal
  - name: Energy Consumption
    description: Energy consumption data endpoints
  - name: Specific Site
    description: Operations for specific sites
  - name: Meters
    description: Meter lookup and meter readings management
  - name: Emissions
    description: Carbon emissions data endpoints
  - name: LOA Management
    description: >-
      Letter of Authority (LOA) management - create, list, view, and update
      status of LOAs
  - name: Supplier Integration
    description: Utilities integration endpoints
  - name: Billing Insights
    description: Account-level billing insights and bill assurance opportunities
  - name: Bill Validation
    description: Utility bill validation and error detection endpoints
  - name: API keys
    description: >-
      Personal JWT-authenticated credential management. Keys default to never
      expire.
paths:
  /v1/api-keys:
    get:
      tags:
        - API keys
      summary: List your API key metadata
      operationId: listApiKeys
      responses:
        '200':
          description: 'Successful response; Cache-Control: no-store.'
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - sites
                  - availableScopes
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ApiKeyMetadata'
                  sites:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                  availableScopes:
                    type: array
                    items:
                      type: string
                      enum:
                        - sites:read
                        - meters:read
                        - consumption:read
                        - costs:read
                        - invoices:read
                        - tariffs:read
                        - mcp:connect
        '400':
          description: Invalid request
        '401':
          description: Signed-in session required
        '403':
          description: Permission denied
        '404':
          description: Feature disabled or key not found
        '409':
          description: Key cannot be rotated
        '429':
          description: Too many requests
      security:
        - sessionJwt: []
components:
  schemas:
    ApiKeyMetadata:
      type: object
      required:
        - id
        - label
        - displayPrefix
        - displaySuffix
        - createdAt
        - lastUsedAt
        - expiresAt
        - revokedAt
        - policyVersion
        - scopes
        - siteIds
        - rotatedFromId
      properties:
        id:
          type: string
          format: uuid
        label:
          type: string
        displayPrefix:
          type: string
        displaySuffix:
          type: string
        createdAt:
          type: string
          format: date-time
        lastUsedAt:
          type: string
          format: date-time
          nullable: true
        expiresAt:
          type: string
          format: date-time
          nullable: true
          description: Null means never expires.
        revokedAt:
          type: string
          format: date-time
          nullable: true
        policyVersion:
          type: integer
          enum:
            - 1
            - 2
        scopes:
          type: array
          items:
            type: string
            enum:
              - sites:read
              - meters:read
              - consumption:read
              - costs:read
              - invoices:read
              - tariffs:read
              - mcp:connect
        siteIds:
          type: array
          items:
            type: string
            format: uuid
        rotatedFromId:
          type: string
          format: uuid
          nullable: true
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: VoltView API key
    sessionJwt:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Signed-in VoltView Supabase access token. API keys are not accepted for
        key management.

````