Initiate on-demand device provisioning

POST/homes/{homeId}/deviceProvisioning

Base URL: https://api.tinkermode.com

If On-Demand Device Provisioning is enabled for your project, a home member can use this endpoint to initiate the process of adding a new device to the home. It returns a device provisioning token that should be passed to the device hardware (via local WiFi, Bluetooth, etc.). The device should then send this token to the Device endpoint to complete the process.

Authentication

Send an Authorization header of the form ModeCloud <AUTH_CODE>.

Must contain a user API key, a service account token, or a project API key with "Admin" privileges.

Path parameters

NameTypeRequiredConstraintsDescription
homeIdintegerYesThe unique ID for a specified home.

Request body

Content type: application/x-www-form-urlencoded

PropertyTypeRequiredConstraintsDescription
deviceClassstringYesDevice Class ID of the device to be added.
deviceTagstringNoAn optional tag assigned to the device to be added.

Request example

deviceClass=smart_light&deviceTag=0001

Responses

200 A device provisioning token is returned.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
expirationTimestringNoread-only (server-generated); format: date-timeExpiration time of this token.
tokenstringNoread-only (server-generated)The provisioning token itself.

401 Authorization is required to access this resource.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

403 Request failed because of invalid data or denied permission.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

429 Request failed because of rate limit.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

500 An unexpected error has occurred.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

503 The service is temporarily unavailable.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.