---
title: "Bulk remove groups from users"
method: POST
path: "/api/groups/bulk/remove"
tags: ["Groups"]
---

# Bulk remove groups from users

`POST /api/groups/bulk/remove`

Bulk remove groups from multiple users, users under specific admins, or all users.

- **group_ids**: List of group IDs to remove (required)
- **users**: Optional list of user IDs to remove the groups from
- **admins**: Optional list of admin IDs — their users will be targeted

Notes:
- If neither 'users' nor 'admins' are provided, groups will be removed from *all users*
- Only existing user-group associations will be removed
- Returns list of affected users (those who had groups removed)

## Request body

- BulkGroup
  - `group_ids` integer[], required
  - `has_group_ids` integer[]
  - `admins` integer[]
  - `users` integer[]
  - `dry_run` boolean

## Response `200`

Success confirmation

- unknown

## Other responses

- `401` — Unauthorized Error
- `403` — Forbidden Error
- `422` — Validation Error

---

[API](https://skmtc.dev/socialser/apis/pasarguardapi.md) · [All operations](https://skmtc.dev/socialser/apis/pasarguardapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/socialser/pasarguardapi/revisions/4b082bbcb6c3/schema)
