---
title: "Destroy one or more unit groups"
method: DELETE
path: "/v1/{facility_id}/unit_groups"
tags: ["api-v1-unit_groups"]
---

# Destroy one or more unit groups

`DELETE /v1/{facility_id}/unit_groups`

## Discussion
### This endpoint is only available if the facility has custom unit groups enabled.

This endpoint can delete multiple unit groups at once by providing a `unit_groups` array of objects with the `id` parameter.
Any Channel Rates associated with the Unit Groups will be deleted along with those Unit Groups.
The `unit_group_id` for Units that correspond to Unit Groups being deleted will be set to `null`.

Common errors that may be encountered:
- All Unit group ids must be valid. If any id doesn't correspond to a unit group in the given facility a Record not found error will be returned.

## Path parameters

- `facility_id` number, required

## Request body

- ApiV1UnitGroupsControllerDestroyInput
  - `unit_groups` string[], required — Array of Unit Group objects

## Response `200`

ok

---

[API](https://skmtc.dev/storedgefms/apis/storable-edge-api-params-in-body.md) · [All operations](https://skmtc.dev/storedgefms/apis/storable-edge-api-params-in-body/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/storedgefms/storable-edge-api-params-in-body/revisions/50fea30c1954/schema)
