Add a device in the room

Last Updated on : 2023-06-20 14:36:43download

You can add devices in the specified family room through this API.

API address

POST: /v1.0/homes/{home_id}/rooms/{room_id}/devices

Request parameter

Parameter nameTypeINRequiredDescription
home_idLonguritrueFamily ID
room_idLonguritrueRoom ID

Description of body

Parameter nameTypeINRequiredDescription
device_idsList trueDevice ID list

Description of device_ids

Parameter nameTypeINRequiredDescription
device_idsString falseSpecific parameter ID

Return parameter

Parameter nameTypeDescription
resultBooleanExecution result:
  • true: Successful execution
  • false: Execution failed

Request example

POST: /v1.0/homes/312321/rooms/2341231/devices
  "device_ids": [

Return example


Error code

For more information, see error code.