---
name: "bindDevice"
mode: "kit"
versionRequirements:
  - { name: "@tuya-miniapp/cloud-api", version: "1.0.5" }
---

## bindDevice

> [VERSION] @tuya-miniapp/cloud-api >= 1.0.5

### Description

Bind or unbind devices

### Parameters

`Params`

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `params` | `QueryBindDeviceDto` | Yes | - | Request body |

### Referenced Types

##### `type` QueryBindDeviceDto

| Property | Type | Description |
| --- | --- | --- |
| `homeId` | `string` | Home ID |
| `stockId` | `string` | Inventory ID |
| `bindUuidList` | `string[]` | UUID list of devices to bind (optional) |
| `unBindUuidList` | `string[]` | UUID list of devices to unbind (optional) |


### Examples

#### Request example

```typescript
import { bindDevice } from '@tuya-miniapp/cloud-api';

bindDevice({
  homeId: '194137',
  stockId: 'stock-1',
  bindUuidList: ['vdevo1'],
})
  .then((ok) => console.log(ok))
  .catch(console.error);
```

#### Response example

```json
true
```
