> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# RemoveGroupMembers

# Package: memberManagement

# Namespace: GroupMembersService

# Method link: https://dev.wix.com/docs/api-reference/crm/community/groups/member-management/members/remove-group-members.md

## Introduction

Removes site members from a specific group.

Only group admins can remove members from their group.

---

## REST API

### Schema

```
 Method: removeGroupMembers
 Description: Removes site members from a specific group.  Only group admins can remove members from their group.
 URL: https://www.wixapis.com/social-groups-proxy/members/v2/groups/{groupId}/members
 Method: DELETE
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  groupId
 Method parameters: 
   param name: groupId | type:   none | required: true 
   query param name: memberIds | type: array<memberIds> | description: Member GUIDs. See the Members API for details.  | validation: minItems 0, maxItems 100, format GUID
 Return type: RemoveGroupMembersResponse
  EMPTY-OBJECT {}


```

### Examples

### RemoveGroupMembers
```curl
~~~cURL
curl -X DELETE \
    https://wixapis.com/social-groups/v2/groups/a4caf853-c0d7-498e-8eaa-3db36522dcbf/members \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: <AUTH>'
    -d '{
        "siteMemberIds": [
            "e6674661-f294-4f1f-9f22-bc11fa8164e7"
        ]
    }'
~~~
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.groups.members.removeGroupMembers(groupId, memberIds)
 Description: Removes site members from a specific group.  Only group admins can remove members from their group.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  groupId, memberIds
 Method parameters: 
   param name: groupId | type: string | description: Group GUID. | required: true | validation: format GUID
   param name: memberIds | type: array<string> | description: Member GUIDs. See the Members API for details. | required: true | validation: minItems 0, maxItems 100, format GUID
 Return type: PROMISE<RemoveGroupMembersResponse>
  EMPTY-OBJECT {}


```

### Examples

### Remove a site member from a group (with elevated permissions)
```javascript
import { members } from '@wix/groups';
import { auth } from '@wix/essentials';

// Sample groupId: '0261a737-2361-4468-a3b1-5ec2b0667836'
//
// Sample  memberIds: ['937cd3db-e9be-4980-93c1-a6d767a11050', '7fe8e9e1-d050-4c86-9684-e7f231600a34']

const elevatedRemoveGroupMembers = auth.elevate(members.removeGroupMembers);

async function removeGroupMembers(groupId, memberIds, options) {
  try {
    const result = await elevatedRemoveGroupMembers(groupId, memberIds);

    return result;
  } catch (error) {
    console.error(error);
    // Handle the error
  }
}
```

### Remove a site member from a group
```javascript
import { members } from '@wix/groups';

// Sample groupId: '0261a737-2361-4468-a3b1-5ec2b0667836'
//
// Sample  memberIds: ['937cd3db-e9be-4980-93c1-a6d767a11050', '7fe8e9e1-d050-4c86-9684-e7f231600a34']
  
 async function removeGroupMembers(groupId, memberIds, options) {
   try {
     const result = await members.removeGroupMembers(groupId, memberIds);

     return result;
   } catch (error) {
     console.error(error);
     // Handle the error
   }
 }

```

### removeGroupMembers (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { members } from '@wix/groups';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { members },
  // Include the auth strategy and host as relevant
});


async function removeGroupMembers(groupId,memberIds) {
  const response = await myWixClient.members.removeGroupMembers(groupId,memberIds);
};
```

---