---
title: "Remove users from a group"
description: "Removes one or more users from a Mindtickle group, by Mindtickle user ID or by username."
contentType: "api-reference"
url: "https://developer.mindtickle.com/docs/users-and-groups/users/remove-users-from-a-group/"
---

## Prerequisites

1. [Authentication and setup](/docs/getting-started/authentication-and-setup/): A valid access token.
2. [Create a group](/docs/users-and-groups/groups/create-a-group/): The group must exist.

## Endpoint

```http
POST /services/data/v4.0/mtobjects/Group/GROUP_ID/users/delete
```

Base URL: the standard REST host for your region. See [Base URLs](/docs/getting-started/authentication-and-setup/#base-urls).

Headers: `Authorization: Bearer ACCESS_TOKEN`, `Content-Type: application/json`.

## Path parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `GROUP_ID` | string | Required | Mindtickle ID of the group from which you want to remove users. |

## Request

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `userids` | Array[string] | Required if `usernames` is not sent | Mindtickle IDs of users that you want to remove from a group. |
| `usernames` | Array[string] | Required if `userids` is not sent | Mindtickle usernames or email addresses of the users that you want to remove from a group. |

### Request example

By Mindtickle user ID:

```json
{
  "userids": ["123456789abcd101", "123456789abcd102", "123456789abcd103"]
}
```

By username:

```json
{
  "usernames": ["alex.fry@example.com", "anna.cruz@example.com", "james.smith@example.com"]
}
```

## Response

On success the endpoint returns HTTP `200` with the message "Users removed from group successfully."

## Errors

| Status | Response message |
| --- | --- |
| `400` | Invalid request. |
| `401` | Invalid token. |
| `404` | Invalid groupid/userid/username. |
| `429` | Too many calls. Retry after 5 min. |
| `500` | Internal server error. |

## Notes

- **Limits:** You can remove a maximum of 500 users per request.
- **Validation:** You must provide either `userids` or `usernames`. Send each ID as a separate string in the JSON array.
- **Usernames:** Provide the username of each user if UID is enabled for your Mindtickle instance, and their email address if UID is not enabled.
- **Field name:** Send the list of Mindtickle user IDs as `userids`, all lowercase. This is the field defined by the request model. Do not change it to `userIds`.

## Related

- [Search groups](/docs/users-and-groups/groups/search-groups/): Find the group ID this endpoint needs.
- [Add a user to groups](/docs/users-and-groups/users/add-a-user-to-groups/): Add a user to groups.
- [Add multiple users to groups](/docs/users-and-groups/users/add-multiple-users-to-groups/): Add several users to groups.
