---
title: "Update device group"
method: PUT
path: "/enterprise/{enterprise_id}/devicegroup/{group_id}/"
tags: ["esper_cloud_api_Device Group"]
---

# Update device group

`PUT /enterprise/{enterprise_id}/devicegroup/{group_id}/`

Fully updates a device group's properties using the action query parameter to specify the operation being performed. This endpoint controls group membership, naming, and hierarchy — use it to add or remove devices, rename a group, or move it to a different parent in the group tree.

action query parameter values

add — Add the devices specified in device_ids to the group
remove — Remove the devices specified in device_ids from the group
rename — Rename the group using the name field
move — Move the group under a new parent using the parent field

Request body fields (DeviceGroupUpdate)

name (required by schema, contextual by action) — Group display name; used with rename
parent — UUID of the new parent group; used with move
device_ids — Array of device UUIDs to add or remove; used with add / remove

**Common Use Cases**

Adding newly provisioned devices into their target group
Reorganizing a group hierarchy by moving subgroups to a new parent
Renaming a group to reflect a changed location, team, or deployment role
Removing retired or reassigned devices from a group

**Best Practices**

Always supply the correct action value — omitting it or mismatching it with the body fields will produce unexpected behavior
For bulk membership changes, prefer passing all affected device_ids in a single call rather than iterating per device
Use GET /enterprise/{enterprise_id}/devicegroup/{group_id}/ to verify current group state before and after updates
For partial updates (e.g., updating only one field without requiring all required fields), prefer PATCH /enterprise/{enterprise_id}/devicegroup/{group_id}/ instead

## Path parameters

- `group_id` string, uuid, required
- `enterprise_id` string, required

## Query parameters

- `action` string

## Response `200`

successful operation

- EsperCloudApiDeviceGroup
  - `id` string, uuid — Group id
  - `name` string, required — Group name
  - `created_on` string, date-time — Date and time of when the group was created
  - `enterprise` string, url — Enterprise url
  - `parent` string, url — Parent group url
  - `device_count` integer — Count of devices in the group
  - `path` string — Path of the group
  - `children_count` integer — Count of child groups
  - `thumbnail` string, uuid — thumbnail associated with the group
  - `blueprint` string, uuid — Blueprint associated with the group.

## Other responses

- `400` — User update error
- `401` — Authorization information is missing or invalid
- `404` — Not Found
- `500` — Internal server error

---

[API](https://skmtc.net/esper/apis/esper-api-reference.md) · [All operations](https://skmtc.net/esper/apis/esper-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/esper/esper-api-reference/versions/e1f64cbb488e/schema)
