> ## Documentation Index
> Fetch the complete documentation index at: https://doc.heat-solutions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set schedules

> Set all scheduled commands for a site. See the schedules guide for detailed documentation.



## OpenAPI

````yaml /cloud-api/openapi.json post /api/v1/public/sites/{siteId}/schedules
openapi: 3.0.3
info:
  title: H.E.A.T. Cloud API
  version: 1.0.0
servers:
  - url: https://cloud.heat-solutions.com
security:
  - bearerAuth: []
paths:
  /api/v1/public/sites/{siteId}/schedules:
    post:
      tags:
        - Sites
      summary: Set schedules
      description: >-
        Set all scheduled commands for a site. See the schedules guide for
        detailed documentation.
      operationId: createSchedules
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: siteId
          required: true
          description: UUID of the target site
      requestBody:
        required: true
        content:
          application/json:
            schema:
              additionalProperties: false
              example:
                schedules:
                  - asset: grid
                    type: upperLimitkW
                    entries:
                      - startAt: '2026-06-01T08:00:00Z'
                        endAt: '2026-06-01T10:00:00Z'
                        value: 50
                  - asset: grid
                    type: lowerLimitkW
                    entries:
                      - startAt: '2026-06-01T08:00:00Z'
                        endAt: '2026-06-01T10:00:00Z'
                        value: -20
                  - asset: grid
                    type: activePowerkW
                    entries:
                      - startAt: '2026-06-01T10:00:00Z'
                        endAt: '2026-06-01T12:00:00Z'
                        value: 30
                  - asset: bess
                    type: activePowerkW
                    entries:
                      - startAt: '2026-06-01T08:00:00Z'
                        endAt: '2026-06-01T10:00:00Z'
                        value: -50
                  - asset: bess
                    type: optimalSocPcnt
                    entries:
                      - startAt: '2026-06-01T10:00:00Z'
                        endAt: '2026-06-01T12:00:00Z'
                        value: 80
                  - asset: solar
                    type: solarCurtailmentPcnt
                    entries:
                      - startAt: '2026-06-01T08:00:00Z'
                        endAt: '2026-06-01T12:00:00Z'
                        value: 10
              type: object
              required:
                - schedules
              properties:
                schedules:
                  minItems: 1
                  maxItems: 10
                  description: >-
                    List of asset schedule commands. Each asset/type combination
                    must appear at most once.
                  type: array
                  items:
                    $ref: '#/components/schemas/AssetScheduleCommand'
      responses:
        '201':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSchedulesBatchResponse'
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                example:
                  error: bad_request
                  message: Duplicate asset/type combination in schedule batch
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                example:
                  error: unauthorized
                  message: Missing or invalid API key
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                example:
                  error: forbidden
                  message: API key does not have access to this site
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                example:
                  error: not_found
                  message: Site not found
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ServerError'
                example:
                  error: internal_server_error
                  message: Failed to create schedule batch
components:
  schemas:
    AssetScheduleCommand:
      additionalProperties: false
      example:
        asset: grid
        type: upperLimitkW
        entries:
          - startAt: '2026-06-01T08:00:00Z'
            endAt: '2026-06-01T10:00:00Z'
            value: 50
      type: object
      required:
        - asset
        - type
        - entries
      properties:
        asset:
          type: string
          enum:
            - load
            - heatpump
            - genset
            - ev
            - grid
            - solar
            - bess
            - wind
          description: Type of asset group
        type:
          type: string
          enum:
            - upperLimitkW
            - lowerLimitkW
            - activePowerkW
            - optimalSocPcnt
            - solarCurtailmentPcnt
          description: >-
            Schedule command type. `upperLimitkW` and `lowerLimitkW` are signed:
            positive = import, negative = export. For BESS assets,
            `activePowerkW` and `optimalSocPcnt` are mutually exclusive.
        entries:
          description: Ordered list of time-range entries for this asset/type pair
          type: array
          items:
            $ref: '#/components/schemas/ScheduleEntry'
    CreateSchedulesBatchResponse:
      additionalProperties: false
      type: object
      required:
        - batchId
        - accepted
      properties:
        batchId:
          format: uuid
          description: Unique identifier for the created schedule batch
          type: string
        accepted:
          description: Number of schedule commands accepted into the batch
          type: number
    ErrorResponse:
      additionalProperties: false
      example:
        error: not_found
        message: The requested resource was not found
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
        message:
          type: string
    ServerError:
      additionalProperties: false
      example:
        error: internal_server_error
        message: An unexpected error occurred
      type: object
      required:
        - error
      properties:
        error:
          type: string
        message:
          type: string
    ScheduleEntry:
      additionalProperties: false
      type: object
      required:
        - startAt
        - endAt
        - value
      properties:
        startAt:
          format: date-time
          description: Entry start time in ISO 8601 format
          type: string
        endAt:
          format: date-time
          description: Entry end time in ISO 8601 format
          type: string
        value:
          description: Numeric value; unit and sign depend on asset and schedule type
          type: number
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````