Skip to main content
POST
/
v1
/
onboarding
/
url
/
generate
generate onboarding url
curl --request POST \
  --url https://api.example.com/v1/onboarding/url/generate \
  --header 'Content-Type: application/json' \
  --header 'x-ws-api-key: <api-key>' \
  --data '
{
  "userId": "user_123456789",
  "userEmail": "[email protected]",
  "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"
    }
  ]
}
'
{
  "url": "https://onboarding.wattshift.com/session/abc123",
  "homeId": "ws_home_123456789"
}

Authorizations

x-ws-api-key
string
header
required

Headers

x-ws-api-key
string

WattShift API Key

Body

application/json
redirectUrl
string
required
enableThirdPartyDevice
boolean
required
hvacs
object[]
required
userId
string
userEmail
string
channelPartnerId
string
homeId
string

used for resuming or restarting onboarding process for existing home

Response

200 - application/json
url
string
required

onboarding url

homeId
string
required

id of home being onboarded