---
title: "Create or update a device group"
method: PUT
path: "/deviceGroups/{deviceGroupId}"
---

# Create or update a device group

`PUT /deviceGroups/{deviceGroupId}`

Create or update a device group.

## Path parameters

- `deviceGroupId` string, required

## Query parameters

- `api-version` string, required

## Request body

- DeviceGroup — The device group definition.
  - `id` string — Unique ID of the device group.
  - `displayName` string, required — Display name of the device group.
  - `filter` string, required — Query defining which devices should be in this group, [Query Language Reference](https://aka.ms/iotcquery).
  - `description` string — Short summary of device group.
  - `etag` string — ETag used to prevent conflict in device group updates.
  - `organizations` string[] — List of organization IDs of the device group, only one organization is supported today, multiple organizations will be supported soon.

## Response `200`

Success

- DeviceGroup — The device group definition.
  - `id` string — Unique ID of the device group.
  - `displayName` string, required — Display name of the device group.
  - `filter` string, required — Query defining which devices should be in this group, [Query Language Reference](https://aka.ms/iotcquery).
  - `description` string — Short summary of device group.
  - `etag` string — ETag used to prevent conflict in device group updates.
  - `organizations` string[] — List of organization IDs of the device group, only one organization is supported today, multiple organizations will be supported soon.

## Other responses

- `default` — An error response received from the IoT Central Service.

---

[API](https://skmtc.net/azure/apis/iotcentral-iotcentral.md) · [All operations](https://skmtc.net/azure/apis/iotcentral-iotcentral/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/iotcentral-iotcentral/versions/565d8813cbd3/schema)
