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

# Upload Site Capacity

> Update the available capacity of a site. Upload the timestamps that the capacity changes,
the capacity will be forward filled from every timestamp.



## OpenAPI

````yaml post /platform/v2/sites/{site_id}/capacity
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /platform/v2/sites/{site_id}/capacity:
    post:
      tags:
        - Site
      summary: Upload Site Capacity
      description: >-
        Update the available capacity of a site. Upload the timestamps that the
        capacity changes,

        the capacity will be forward filled from every timestamp.
      operationId: upload_site_capacity_platform_v2_sites__site_id__capacity_post
      parameters:
        - name: site_id
          in: path
          required: true
          schema:
            type: string
            title: Site Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SiteCapacityBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationResponse'
      security:
        - APIKeyHeader: []
components:
  schemas:
    SiteCapacityBody:
      properties:
        data:
          items:
            $ref: '#/components/schemas/SiteCapacityRow'
          type: array
          minItems: 1
          title: Data
          example:
            - valid_time: 2024-09-15T00:00Z
              value: 6000
            - valid_time: 2024-09-18T12:00Z
              value: 12000
            - valid_time: 2024-09-24T12:00Z
              value: 6000
      type: object
      required:
        - data
      title: SiteCapacityBody
    ValidationResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorItem'
          type: array
          title: Errors
      type: object
      required:
        - errors
      title: ValidationResponse
    SiteCapacityRow:
      properties:
        valid_time:
          type: string
          format: date-time
          title: Valid Time
          example: '2026-01-01T00:00:00Z'
        value:
          anyOf:
            - type: number
            - type: 'null'
          title: Value
          example: 6000
      type: object
      required:
        - valid_time
        - value
      title: SiteCapacityRow
    ErrorItem:
      properties:
        field:
          type: string
          title: Field
        message:
          type: string
          title: Message
      type: object
      required:
        - field
        - message
      title: ErrorItem
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: >-
        Your API key. This is required to access our API programatically. You
        can view your API key in the Rebase dashboard.
      in: header
      name: Authorization

````