# Delete site group

`DELETE /api/configuration/site-groups/{all}`

- **Products:** Operator (`FOH`)
- **Features:** Front of House Generic Access (`FOHGENERIC`)

HTML version: [Delete site group](https://support.gladstonesoftware.cloud/reference/configuration/delete-site-group)

## Overview

Deletes a site group and the links between that group and its sites. **The sites themselves are not deleted** — they survive and are simply no longer members of any group. The site group is permanently deleted; there is no inactive flag and no undo.

Because only the group and its membership links are removed, there is normally nothing to block the delete. Sites that were in the group become ungrouped, which in turn makes them eligible for [Delete site](delete-site.md), an operation that refuses to run while a site is grouped.

Deleting a site group that does not exist returns `404`, so a repeated delete gives you `404` rather than a no-op. [Retrieve site group by id](get-site-group-by-id.md) returns `404` for the group immediately afterwards. A successful call returns `204 No Content` with an empty body.

## Endpoint

`DELETE {base_url}/api/configuration/site-groups/{all}`

`{base_url}` is the environment URL issued to your integration. See [Authenticating with Gladstone APIs](../../guides/authenticating-with-gladstone-apis.md).

## Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `siteGroupId` | string | Yes | The site group to delete, matching the `id` returned by [Retrieve all site groups](retrieves-all-site-groups-with-their-configuration-details.md). This is the group's identifier, not the identifier of a site inside it. |

## Sample request

```bash title="cURL"
curl -X DELETE '{base_url}/api/configuration/site-groups/{all}' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'
```

## Errors

| Status | Meaning | When |
|--------|---------|------|
| `400` | Bad request | The id path segment is empty. The body is the literal string `Id cannot be null or empty`. |
| `404` | Not found | No site group exists with that id, including when you repeat a delete that has already succeeded. The body is empty. |
| `409` | Conflict | Returned as `There are records linked to the ID {siteGroupId} that are stopping the operation being completed` when other records still reference the group, so it cannot be deleted. Handle it rather than assuming it cannot occur. |
| `500` | Internal server error | Any other unexpected server-side failure. |
