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

# create home



## OpenAPI

````yaml api-reference/openapi.json POST /v1/homes/create
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/homes/create:
    post:
      tags:
        - homes
      summary: create home
      operationId: createHome
      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/CreateClientHomeDto'
            example:
              name: My Test Home
              zipcode: '95313'
              utilityId: '14328'
              ratePlanId: 6915de25881cbc6041e4c7f1
              solarSystemSizeKw: 5
              isNonNetMetered: false
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientHomeDto'
              example:
                id: ws_home_123456789
                createdAt: '2025-01-02T12:00:00.000Z'
                updatedAt: '2025-01-02T12:00:00.000Z'
                name: My home
                userId: user_123456789
                UtilityId: '12199'
                ratePlanId: 6915de25881cbc6041e4c7f1
                unstructuredAddress: null
                timezone: America/Los_Angeles
                country: US
                city: San Francisco
                zipcode: '94107'
                streetAddress: 123 Market St
                meterId: null
                meterIdSource: null
                energyMarketBiddingEnabled: true
                enabled: true
                carbonSignalIntensity: MEDIUM
                channelPartnerId: null
        '400':
          description: Validation failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelopeDto'
              example:
                request_id: req_123
                error_code: VALIDATION_FAILED
                message: Request validation failed.
                field_errors:
                  - field: zipcode
                    message: zipcode is invalid
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelopeDto'
              example:
                request_id: req_123
                error_code: AUTH_MISSING_API_KEY
                message: Missing x-ws-api-key header.
                recovery_action: >-
                  Provide the x-ws-api-key header. If this contradicts the
                  public docs or OpenAPI contract, submit structured feedback
                  through /v1/feedback.
      security:
        - x-ws-api-key: []
        - x-ws-api-key: []
components:
  schemas:
    CreateClientHomeDto:
      type: object
      properties:
        userId:
          description: The ID of the owner of the home
          type: string
        name:
          description: The name of the home
          type: string
          minLength: 1
          maxLength: 255
        UtilityId:
          description: Deprecated utility ID
          type: string
        utilityId:
          description: The utility ID
          type: string
        ratePlanId:
          description: The rate plan ID
          type: string
          nullable: true
        unstructuredAddress:
          description: The unstructured address
          type: string
        clientId:
          description: The client ID
          type: string
        country:
          description: The country
          type: string
        city:
          description: The city
          type: string
        zipcode:
          description: The zip code
          type: string
        streetAddress:
          description: The street address
          type: string
        solarInfo:
          description: Solar installation information
          type: object
          properties:
            isNonNetMetered:
              type: boolean
            solarCapacityKw:
              type: number
            moduleType:
              description: Type of solar module
              type: string
              enum:
                - standard
                - premium
                - thinFilm
            arrayType:
              description: Type of solar array
              type: string
              enum:
                - fixedOpenRack
                - fixedRoof
                - fixedOpenRackBallast
                - tracking1Axis
                - tracking1AxisBacktracking
                - tracking2Axis
            solarPanelEfficiency:
              type: number
            azimuth:
              type: number
            tilt:
              type: number
            enabled:
              type: boolean
              nullable: true
          required:
            - isNonNetMetered
            - solarCapacityKw
            - moduleType
            - arrayType
            - solarPanelEfficiency
            - azimuth
            - tilt
        solarSystemSizeKw:
          description: >-
            Solar system size in kW; creates or updates solar info when set with
            isNonNetMetered
          type: number
        isNonNetMetered:
          description: >-
            Non-net-metered solar billing flag; creates or updates solar info
            when set with solarSystemSizeKw
          type: boolean
        carbonSignalIntensity:
          description: The carbon signal intensity
          type: string
          enum:
            - LOW
            - MEDIUM
            - HIGH
          x-enumNames:
            - LOW
            - MEDIUM
            - HIGH
        meterId:
          type: string
        meterIdSource:
          type: string
          enum:
            - leap
          x-enumNames:
            - LEAP
        enabled:
          description: This is to check if the home is enabled
          type: boolean
        channelPartnerId:
          description: Optional tracking for channel partners (requires using a valid ID)
          type: string
        modalHome:
          description: Whether this home was created from the modal flow
          type: boolean
      required:
        - name
    ClientHomeDto:
      type: object
      properties:
        id:
          type: string
        createdAt: {}
        updatedAt: {}
        name:
          type: string
          nullable: true
        userId:
          type: string
          nullable: true
        UtilityId:
          type: string
          nullable: true
        ratePlanId:
          type: string
          nullable: true
        unstructuredAddress:
          type: string
          nullable: true
        timezone:
          type: string
          nullable: true
        country:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        zipcode:
          type: string
          nullable: true
        streetAddress:
          type: string
          nullable: true
        meterId:
          type: string
          nullable: true
        meterIdSource:
          type: string
          nullable: true
        energyMarketBiddingEnabled:
          type: boolean
        enabled:
          type: boolean
          nullable: true
        carbonSignalIntensity:
          type: string
          enum:
            - LOW
            - MEDIUM
            - HIGH
          x-enumNames:
            - LOW
            - MEDIUM
            - HIGH
        modalHome:
          type: boolean
        channelPartnerId:
          type: string
          nullable: true
      required:
        - id
        - createdAt
        - updatedAt
        - energyMarketBiddingEnabled
        - carbonSignalIntensity
        - modalHome
    ApiErrorEnvelopeDto:
      type: object
      properties:
        request_id:
          type: string
          example: req_123
        error_code:
          type: string
          enum:
            - AUTH_MISSING_API_KEY
            - AUTH_INVALID_API_KEY
            - AUTH_EXPIRED_CREDENTIAL
            - AUTH_REVOKED_CREDENTIAL
            - AUTH_INSUFFICIENT_SCOPE
            - VALIDATION_FAILED
            - RATE_LIMITED
            - NOT_FOUND
            - FORBIDDEN
            - PRODUCTION_ACCESS_DENIED
            - INTERNAL_ERROR
          example: VALIDATION_FAILED
        message:
          type: string
          example: Request validation failed.
        recovery_action:
          type: string
          example: >-
            Provide the x-ws-api-key header. If this contradicts the public
            docs, submit feedback through /v1/feedback.
        field_errors:
          type: array
          items:
            $ref: '#/components/schemas/ApiFieldErrorDto'
        retry_after_seconds:
          type: number
          example: 3600
      required:
        - request_id
        - error_code
        - message
    ApiFieldErrorDto:
      type: object
      properties:
        field:
          type: string
          example: zipcode
        message:
          type: string
          example: zipcode is invalid
      required:
        - message
  securitySchemes:
    x-ws-api-key:
      type: apiKey
      in: header
      name: x-ws-api-key
      description: WattShift API key

````