Remove a device from a device group

Last edited on 2026-03-16

This API should be called on the server side and cannot be called directly on the client side (Mini Program, web page, APP, etc.). For details, please refer to API Call Guide.

API English Name: removeIotGroupDevice

This API is used to remove devices that have been added to a device group.

1. Call Method

HTTPS Call

POST https://api.weixin.qq.com/wxa/business/group/removedevice?access_token=ACCESS_TOKEN

Cloud Call

  • This API does not support cloud call.

Third-party Call

  • This API does not support third-party platform calls.

2. Request Parameters

Query Parameters Query String Parameters

ParameterTypeRequiredDescription
access_tokenstringYesAPI call credential, you can use access_token

Request Body Request Payload

ParameterTypeRequiredDescription
group_idstringYesThe unique identifier of the device group.
device_listobjarrayYesList of devices.

Body.device_list(Array) Object Payload

List of devices.

ParameterTypeRequiredDescription
model_idstringYesDevice model ID. Obtained by registering the device on the WeChat Official Platform.
snstringYesUnique device serial number. Assigned by the manufacturer.

3. Response Parameters

Response Body Response Payload

ParameterTypeDescription
errcodenumberError code.
errmsgstringError message.
device_listobjarrayList of devices.

Res.device_list(Array) Object Payload

List of devices.

ParameterTypeDescription
model_idstringUnique identifier of the device model.
snstringUnique identifier of the device.
errcodenumberError code.

4. Notes

No special notes for this API

5. Code Example

Request Example

{
  "group_id": "GROUP_ID",
  "device_list": [
    {
      "model_id": "MODEL_ID1",
      "sn": "SN1"
    },
    {
      "model_id": "MODEL_ID2",
      "sn": "SN2"
    }
  ]
}

Response Example

{
  "errcode": 0,
  "errmsg": "ok",
  "device_list": [
    {
      "model_id": "MODEL_ID1",
      "sn": "SN1",
      "errcode": 0
    },
    {
      "model_id": "MODEL_ID2",
      "sn": "SN2",
      "errcode": 0
    }
  ]
}

6. Error Codes

The following is the error code list of this API, other error codes can refer to Common Error Codes; When encountering errors in calling the API, you can use the official API Diagnostic Tool to assist in locating and analyzing problems.

Error CodeError DescriptionSolution
43002require POST methodMethod call error. Please use the POST method to call this API.
44002empty post dataThe POST data packet is empty. The body parameter of the POST request cannot be empty.
47001data format errorError parsing JSON/XML content; missing parameters in the POST data; parameters must be written as a JSON string in the body of the POST request. Please check and correct, then retry.
9800013Invalid `group_id`.Check the `group_id`.
9800017This device does not belong to the device group.Check whether the device has been added to the device group.

7. Applicable Scope

The callable account types for this API are not yet clear, or are determined by the calling parameters in business. Please refer to the actual calling situation.