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
- Mock serverhttps://api.esper.io/_mock/openapi/enterprise/{enterprise_id}/devicegroup/{group_id}/
- https://develop-api.esper.cloud/apihttps://develop-api.esper.cloud/api/enterprise/{enterprise_id}/devicegroup/{group_id}/
curl -i -X PUT \
'https://api.esper.io/_mock/openapi/enterprise/{enterprise_id}/devicegroup/{group_id}/?action=string' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: */*' \
-d '{
"name": "string",
"parent": "42e2bc1b-6741-4e2e-b138-97b4a342c999",
"device_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
}'successful operation
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "created_on": "2019-08-24T14:15:22Z", "enterprise": "string", "parent": "string", "device_count": 0, "path": "string", "children_count": 0, "thumbnail": "dec11f24-4767-4257-ac7d-bde137bc173e", "blueprint": "f63e6a96-31ed-4c31-b384-a8046257f34c" }