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

# set webhook thermostat behavior



## OpenAPI

````yaml /api-reference/openapi.json post /v1/devices/hvac/thermostat_behavior/webhook/set
openapi: 3.0.0
info:
  title: WattShift API
  description: An API for the WattShift Service (https://wattshift.com/partners)
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /v1/devices/hvac/thermostat_behavior/webhook/set:
    post:
      tags:
        - hvac
      summary: set webhook thermostat behavior
      operationId: HvacApiKeyAuthController_setWebhookForThermostatBehavior_v1
      parameters:
        - name: x-ws-api-key
          in: header
          description: WattShift API Key
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetWebhookDto'
            example:
              webhookUrl: https://example.com/wattshift/webhook
              securityKey: your_webhook_security_key
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetWebhookResponseDto'
              example:
                id: ws_webhook_123456789
                createdAt: '2025-01-02T12:00:00.000Z'
                updatedAt: '2025-01-02T12:00:00.000Z'
                apiOwnerOrgId: org_123456789
                webhookUrl: https://example.com/wattshift/webhook
                securityKey: your_webhook_security_key
                eventType: THERMOSTAT_QUERY
                lastSentAt: null
                openAdr: false
      security:
        - x-ws-api-key: []
components:
  schemas:
    SetWebhookDto:
      type: object
      properties:
        webhookUrl:
          type: string
          format: uri
        securityKey:
          description: >-
            This security key will be sent back in the webhook under
            `x-ws-security-key` header.
          type: string
      required:
        - webhookUrl
        - securityKey
    SetWebhookResponseDto:
      type: object
      properties:
        id:
          type: string
        createdAt: {}
        updatedAt: {}
        apiOwnerOrgId:
          type: string
        webhookUrl:
          type: string
        securityKey:
          type: string
          nullable: true
        eventType:
          type: string
          enum:
            - UNKNOWN
            - SET_POINT_SCHEDULE
            - THERMOSTAT_QUERY
            - PRICE_SIGNAL
          x-enumNames:
            - UNKNOWN
            - SET_POINT_SCHEDULE
            - THERMOSTAT_QUERY
            - PRICE_SIGNAL
        openAdr:
          type: boolean
        lastSentAt:
          nullable: true
      required:
        - id
        - createdAt
        - updatedAt
        - apiOwnerOrgId
        - webhookUrl
        - eventType
        - openAdr
  securitySchemes:
    x-ws-api-key:
      type: apiKey
      in: header
      name: x-ws-api-key
      description: WattShift API key

````