# Remove member

> Source: https://elaichi.ai/docs/api-reference/members/member/deletemember/

`DELETE /member/{userId}`

Resource: **Member** · API: **Members**

## Path parameters

- **`userId`** _(string, required)_
  Resource id

## Request body

- **`connection_actions`** _(array<object>)_
  - **`connection_id`** _(string)_
  - **`action`** _(string)_
    Allowed: `transfer_org`, `transfer_team`, `transfer_user`, `delete`
  - **`team_id`** _(string)_
  - **`target_user_id`** _(string)_

## Response body

- **`success`** _(boolean)_

## Code examples

### curl

```bash
curl -X DELETE 'https://api.elaichi.ai/member/<userId>' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.elaichi.ai/member/<userId>', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import os
import requests

url = "https://api.elaichi.ai/member/<userId>"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}

response = requests.delete(url, headers=headers)
print(response.json())
```
