> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langdock.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Group

> Delete a workspace group and its memberships without deleting the people or their resources

This endpoint deletes a group and its memberships. The people stay in the workspace. Use [Deactivate User](https://docs.langdock.com/en/developer/user-management-api/deactivate-user.md) to remove someone from the workspace.

The call is authorized by the workspace API key's `USER_MANAGEMENT_API` scope. It does not run as the person who created the key, so it keeps working after that admin leaves the workspace.

## Base URL

```
https://api.langdock.com/user-management/v1/groups/{groupId}
```

> [!WARNING]
>
> **Dedicated deployments**
>
> Replace `api.langdock.com` with `<your-deployment-url>/api/public` in all requests.

## Prerequisites

* **API Key** with the `USER_MANAGEMENT_API` scope
* The API key must be created by a workspace admin

## Behavior

* Returns `{ "status": "success", "id": "..." }`.
* Agents, folders, and other resources stay with their owners. Access that was granted through this group no longer applies.
* **SCIM managed group?** Returns `409` with `code: "GROUP_SCIM_MANAGED"` and message `This group is managed by SCIM and cannot be changed through the API.`
* **Unknown id, a deleted group, or another workspace?** Returns `404` with `code: "GROUP_NOT_FOUND"` and message `Group not found.`
* **`groupId` is not a UUID?** Returns `400`.

> [!NOTE]
>
> Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on [API Key Best Practices](https://docs.langdock.com/en/admin/ai-adoption-and-rollout/best-practices/api-key-best-practices.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.