# Take contacts out of a group (/api/removeContactsFromGroup)

This `DELETE` carries a request body, which is unusual enough to look
like a mistake. It is not: what is being removed is the membership of
a list of contacts, and that list does not fit in the path. The
contacts themselves are untouched.

Endpoint: DELETE /api/v1/groups/{id}/contacts
Full URL: https://app.sendkuy.com/api/v1/groups/{id}/contacts
- path parameter id (required): string — The prefixed id of the object.
- header parameter Idempotency-Key (optional): string — Any unique string, one per logical request. Retrying with the same key returns the first answer instead of doing the work twice, and answers with `Idempotent…
Request body (JSON, required); required fields: contacts
Example "One contact": {"contacts":["con_9cBe3A1H-SLhW5fONWZ32wb-IIio5Ts3"]}
Success status: 200

cURL:

```bash
curl -X DELETE https://app.sendkuy.com/api/v1/groups/grp_9cBe3A1H-SLhW5fONWZ32wb-IIio5Ts3/contacts \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "contacts": [
    "con_9cBe3A1H-SLhW5fONWZ32wb-IIio5Ts3"
  ]
}'
```

Node.js:

```ts
import { SendKuy } from 'sendkuy';

const sendkuy = new SendKuy('sk_live_YOUR_API_KEY');

const result = await sendkuy.groups.removeContacts('grp_9cBe3A1H-SLhW5fONWZ32wb-IIio5Ts3', {
  contacts: [
    'con_9cBe3A1H-SLhW5fONWZ32wb-IIio5Ts3',
  ],
});
```

PHP:

```php
<?php

use SendKuy\SendKuy;

$sendkuy = new SendKuy('sk_live_YOUR_API_KEY');

$result = $sendkuy->groups()->removeContacts('grp_9cBe3A1H-SLhW5fONWZ32wb-IIio5Ts3', [
    'contacts' => [
        'con_9cBe3A1H-SLhW5fONWZ32wb-IIio5Ts3',
    ],
]);
```

Python:

```python
import requests

response = requests.request(
    "DELETE",
    "https://app.sendkuy.com/api/v1/groups/grp_9cBe3A1H-SLhW5fONWZ32wb-IIio5Ts3/contacts",
    headers={"Authorization": "Bearer sk_live_YOUR_API_KEY"},
    json={
        "contacts": [
            "con_9cBe3A1H-SLhW5fONWZ32wb-IIio5Ts3"
        ]
    },
)

data = response.json()["data"]
```