> ## 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.

# Remove Group Members

> Remove people from a workspace group by email without removing them from the workspace

This endpoint removes up to 250 members from a group by email. Send the emails as a JSON body. It does not remove them from the workspace. Use [Deactivate User](https://docs.langdock.com/en/developer/user-management-api/deactivate-user.md) for that.

A `200` response can still leave some emails unchanged. Check `removed` and `notMembers`.

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}/members
```

> [!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

* Send 1 to 250 emails. An empty list returns `400`.
* `removed` lists members removed in this call, with `id` and `email`. `notMembers` lists emails that were not in the group, including unknown emails.
* Sending the same email again returns `200` and puts it in `notMembers`.
* You can remove the last group admin. The group can end up with no members.
* Email matching ignores case.
* **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 group, 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.