> ## 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.

# Delete user-site assignment

> Remove a user's access to a specific site. Requires admin permissions.



## OpenAPI

````yaml delete /v1/deleteUserSiteAssignments/{userId}/{siteId}
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


    Every endpoint accepts a signed-in VoltView session token in the
    `Authorization: Bearer <token>` header.


    Endpoints marked **API key** also accept a VoltView API key in the
    `x-api-key` header. Create keys in Settings → API keys. A key acts as you,
    so it can never do more than your own account, and it is further limited to
    the scopes and sites you choose when creating it. Keys do not expire unless
    you set a lifetime; revoke a key to stop it working.


    Send an API key only in `x-api-key`. Sending it as `Authorization: Bearer`
    returns 401, and sending both headers together is rejected.


    ### Authentication errors

    - `401 Unauthorized`: missing, invalid, expired or revoked credential.

    - `403 Forbidden` with `This key does not permit this operation`: the key is
    valid but lacks the scope for this endpoint, or the endpoint does not accept
    API keys.

    - `403 Forbidden` from the endpoint itself: your account lacks the
    permission (for example meter lookup or admin) or access to the requested
    site.


    ## 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
  version: 1.0.0
  contact:
    email: info@voltview.co.uk
  license:
    name: Proprietary
servers:
  - url: https://api.voltview.co.uk
    description: Production server
security:
  - sessionJwt: []
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/deleteUserSiteAssignments/{userId}/{siteId}:
    delete:
      tags:
        - User
      summary: Delete user-site assignment
      description: Remove a user's access to a specific site. Requires admin permissions.
      operationId: deleteUserSiteAssignment
      parameters:
        - in: path
          name: userId
          required: true
          schema:
            type: string
          description: ID of the user to remove from site
        - in: path
          name: siteId
          required: true
          schema:
            type: string
          description: ID of the site to remove user from
      responses:
        '200':
          description: User-site assignment deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
        4XX:
          $ref: '#/components/responses/Error4XX'
components:
  responses:
    Error4XX:
      description: Client error response
      content:
        application/json:
          schema:
            type: object
            properties:
              type:
                type: string
                enum:
                  - error
              error:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - invalid_request_error
                  message:
                    type: string
                    default: Invalid request
  securitySchemes:
    sessionJwt:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Signed-in VoltView session token. API key management always requires a
        session.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.