---
title: "Remove members in bulk"
method: POST
path: "/groups/{id}/members/bulk-remove"
tags: ["groups"]
---

# Remove members in bulk

`POST /groups/{id}/members/bulk-remove`

## Request

- Base URL: `https://api.instruxi.dev/api/v1/enforcer`
- URL: `https://api.instruxi.dev/api/v1/enforcer/groups/{id}/members/bulk-remove`
- Auth: one of:
  - API key in header `Authorization`
  - API key in header `X-API-Key`

Removes many accounts from one group in a single call, reporting every id as `removed` or `not_member`. The verdict comes from the delete itself rather than a read beforehand, so two operators undoing the same bad import cannot both be told they removed someone. A POST rather than a DELETE because it carries a body. Same ResourceAuth write on the group as every other membership change, and one membership event plus one audit record per member actually removed — removal hard-deletes the row, so that audit record is the only durable trace the person was ever in the group. At most 1000 ids per call.

## Path parameters

- `id` string, required

## Request body

- InternalDeliveryHttpHandlerBulkMembersRequest
  - `account_ids` string[]
  - `role` 'member' | 'manager': Role every ADDED member joins in (member, the default, or manager). Ignored by bulk-remove; existing members keep their role.

## Response `200`

OK

- InternalDeliveryHttpHandlerBulkMembersResponse
  - `data` EnforcerV3InternalUsecaseGroupsMemberBulkResult
    - `added` integer
    - `agent_consent_required` integer
    - `already_member` integer
    - `cross_tenant` integer
    - `moved` integer
    - `not_found` integer
    - `not_group_member` integer
    - `not_member` integer
    - `removed` integer
    - `results` EnforcerV3InternalUsecaseGroupsMemberOutcome[]
      - `account_id` string
      - `status` string: Status is one of: added they are in the group, and were not before already_member they were already in it — an import re-run, not an error not_found no such account cross_tenant the account belongs to a different tenant agent_consent_required the account is a service account (AGENTS_CONTRACT §6.5) and the caller is not a manager() of its bound agent (or TenantManage, for a plain service account with no agent) not_group_member the account is a service account and the caller — short of TenantManage/CrossTenant — is not themselves a member of this group
  - `success` boolean

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden

---

[API](https://skmtc.dev/instruxi/apis/enforcer-api.md) · [All operations](https://skmtc.dev/instruxi/apis/enforcer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/instruxi/apis/enforcer-api/revisions/fa82bc1becc0?raw)
