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

# Delete a device group

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

Permanently deletes a device group from the enterprise. The group must be empty — groups containing one or more devices cannot be deleted. Move all member devices to another group first before issuing the delete request.

**Common Use Cases**

Removing groups that are no longer needed after a deployment phase ends
Cleaning up duplicate or incorrectly named groups
Reorganizing fleet structure by consolidating groups

**Best Practices**

Ensure the group has no devices before calling this endpoint — the operation will fail if any devices remain in the group; use PUT /enterprise/{enterprise_id}/devicegroup/{group_id}/ with action=remove or action=move to empty the group first
Confirm the group ID is correct using GET /enterprise/{enterprise_id}/devicegroup/{group_id}/ before issuing the delete — this action is irreversible
Check for any active Pipelines, Blueprints, or scheduled commands targeting this group before deleting to avoid orphaned configurations
If the goal is to reorganize rather than fully remove, consider using action=move to reassign the group to a new parent instead

## Path parameters

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

## Response `204`

The resource was deleted successfully.

## Other responses

- `400` — Invalid request.
- `401` — Authorization information is missing or invalid.
- `403` — Forbidden, no permission to perform this action.
- `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)
