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

# generate onboarding url



## OpenAPI

````yaml /api-reference/openapi.json post /v1/onboarding/url/generate
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/onboarding/url/generate:
    post:
      tags:
        - onboarding
      summary: generate onboarding url
      operationId: OnboardingController_generateUrl_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/GenerateUrlRequestDto'
            example:
              userId: user_123456789
              userEmail: customer@example.com
              redirectUrl: https://example.com/onboarding/complete
              enableThirdPartyDevice: true
              hvacs:
                - name: Living room thermostat
                  enabled: true
                  defaultMode: AUTO
                  tempUnits: F
                  maxTemp: 78
                  minTemp: 60
                  defaultCoolSetpoint: 74
                  defaultHeatSetpoint: 68
                  deviceType: Hvac
                  canHeat: true
                  canCool: true
                  targetTemp: true
                  targetCoolSetpoint: 74
                  targetHeatSetpoint: 68
                  currentTemp: 71
                  referenceId: thermostat-1
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateUrlResponseDto'
              example:
                url: https://onboarding.wattshift.com/session/abc123
                homeId: ws_home_123456789
      security:
        - x-ws-api-key: []
components:
  schemas:
    GenerateUrlRequestDto:
      type: object
      properties:
        userId:
          type: string
        userEmail:
          type: string
        channelPartnerId:
          type: string
        redirectUrl:
          type: string
        enableThirdPartyDevice:
          type: boolean
        hvacs:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              enabled:
                type: boolean
              defaultMode:
                type: string
                enum:
                  - 'OFF'
                  - HEAT
                  - COOL
                  - AUTO
                x-enumNames:
                  - 'OFF'
                  - HEAT
                  - COOL
                  - AUTO
              tempUnits:
                type: string
                enum:
                  - F
                  - C
                x-enumNames:
                  - F
                  - C
              maxTemp:
                type: number
              minTemp:
                type: number
              defaultCoolSetpoint:
                type: number
              defaultHeatSetpoint:
                type: number
              deviceType:
                type: string
                enum:
                  - Hvac
                  - Battery
                x-enumNames:
                  - Hvac
                  - Battery
              canHeat:
                type: boolean
              canCool:
                type: boolean
              targetTemp:
                type: boolean
              targetCoolSetpoint:
                type: number
              targetHeatSetpoint:
                type: number
              currentTemp:
                type: number
              referenceId:
                type: string
            required:
              - name
              - enabled
              - defaultMode
              - tempUnits
              - maxTemp
              - minTemp
              - defaultCoolSetpoint
              - defaultHeatSetpoint
              - deviceType
              - canHeat
              - canCool
              - targetTemp
              - targetCoolSetpoint
              - targetHeatSetpoint
              - currentTemp
              - referenceId
        homeId:
          description: used for resuming or restarting onboarding process for existing home
          type: string
      required:
        - redirectUrl
        - enableThirdPartyDevice
        - hvacs
    GenerateUrlResponseDto:
      type: object
      properties:
        url:
          description: onboarding url
          type: string
        homeId:
          description: id of home being onboarded
          type: string
      required:
        - url
        - homeId
  securitySchemes:
    x-ws-api-key:
      type: apiKey
      in: header
      name: x-ws-api-key
      description: WattShift API key

````