# Remove Members

## <mark style="color:green;">POST</mark> api/v1/channel/members/remove

* Note: This is to remove certain members from a group chat. Only the Admin of the group has access.
* Header

| Field         | Type   | Remarks                                                                                                  |
| ------------- | ------ | -------------------------------------------------------------------------------------------------------- |
| ApiKey        | String | [ApiKey](https://relationlabs.gitbook.io/relation-one-api/guide/glossary#apikey) acquired from the admin |
| Authorization | String | Bearer ${unifiedAuthToken} , in which the unifiedAuthToken is returned by /api/v1/auth                   |

* Request Parameters

| Field       | Type           | Remarks                                 |
| ----------- | -------------- | --------------------------------------- |
| channelUuid | String         | the uuid of the group chat              |
| members     | Array\[String] | The relationId of members being removed |

* Request Example

```shell
curl POST 'https://api.relationlabs.ai/api/v1/channel/members/remove' \
--header 'ApiKey: <ApiKey>' \
--header 'Authorization: bearer eyJhbGci1OiJFUzI1NiJ9.eyJqdGkiOiI0MzdiN2EzZDEwMGY0ODVkOWVhMWUz1ZmZlOWE1NmEyZSIsImlzcyI6InJlbGF0aW9ubGFicy5haSIsImlhdCI6MTY2NTIxNTUzNSwic3ViIjoiZGhreXEtc3FhYWEtYWFhYWotc2d6M3EtY2FpIiwiZXhwIjoxNjY1ODIwMzM1fQ.rj7KKuIcgmvaIwZ63YHnXQ4jvvI-eR2Wo7k3YE1yzMuxo8j5ezCowKDpcW0u9zIuHPFqwD0-1XPWdPLR1d1HLFw' \
--header 'Content-Type: application/json' \
--data-raw '{
    "channelUuid":"4f326124812c41448bc587bf6b2eaf42",
    "members":["dhkyq-sqaaa-aaaaj-sgz3q-cai","qddyo-3aaaa-aaaaj-allxa-cai"]
}'
```

* Response Parameters

| Field | Type   | Remarks            |
| ----- | ------ | ------------------ |
| code  | String | the Return Code    |
| desc  | String | the Return Message |
| data  | Object | the Return Data    |

* Response Body

```json
{
    "code": "0",
    "desc": "success",
    "data": null
}
```

* Return Code

| code  | desc                          | Remarks                           |
| ----- | ----------------------------- | --------------------------------- |
| 0     | success                       | the flag for a successful request |
| 13107 | Not the admin of this channel | Not the admin of this group chat. |
