# Remove Team Member

Take someone off a team. Their role and other teams stay as they are.

`DELETE https://connect.mindcloud.co/v2/teams/:teamId/members/:userId`

Permissions: `role:manage`.

## Parameters

### Path

- `teamId` (string, required): The team's id, from List Teams.
- `userId` (string, required): The member's userId, from List Members.

### Headers

- `X-Company-Id` (string): Optional. The id of the organization to act in. Leave it out to act in the API key's own organization. A key can also act in its child organizations, and, with "Use this key across all of your organizations" on, in every organization its creator can open in the app. List them with GET /v2/companies. Every response's X-Company-Id header names the organization it acted in. See [Organizations](https://mindcloud.co/docs/api/rest/introduction/organizations).

## Example request

```bash
curl --request DELETE \
  --url 'https://connect.mindcloud.co/v2/teams/tm_Q8dL2vN6tRwe/members/user_2wXk9Lm4Pq7Rz3Ts8Vb1Nc6Hd' \
  --header 'Authorization: Bearer $MINDCLOUD_API_TOKEN'
```

## Response fields

- `id` (string): The id of the resource that was deleted.

## Example response

```json
{
  "success": true,
  "data": {
    "id": "user_2wXk9Lm4Pq7Rz3Ts8Vb1Nc6Hd"
  }
}
```

## Errors

- 403 Own membership (TEAM_MEMBERSHIP_SELF_CHANGE_FORBIDDEN): `FORBIDDEN` / `TEAM_MEMBERSHIP_SELF_CHANGE_FORBIDDEN` "You cannot change your own team membership. Ask another admin."
- 404 Not on the team (TEAM_MEMBER_NOT_FOUND): `NOT_FOUND` / `TEAM_MEMBER_NOT_FOUND` "This person is not on the team."
