# Delete a membership

`DELETE /api/v1/vaults/{vault}/groups/{group}/members/{membership}`

Delete a membership that was recorded by mistake.

Somebody who really left keeps their membership with a left_on instead, given by changing the membership. The contact is not deleted.

Groups are not yet available to every account. Until they are available to yours, every endpoint here answers 404.

## Path parameters

- `vault` (string, required): The vault the groups live in, named either by the readable name it reports as slug or by its id.
- `group` (uuid, required): The id of the group. One addressed through the wrong vault, or belonging to another account, answers 404.
- `membership` (uuid, required): The id of the membership. One addressed through another group answers 404.

## Returns

Nothing at all.

## Rate limit

Sixty requests per minute, per user, shared by every key and device. Every answer carries the budget left in `X-RateLimit-Remaining`.

## Request

```sh
curl https://people.hansyeoh.com/api/v1/vaults/dunder-mifflin/groups/5d2a7c91-3e48-4b06-9f1d-a83c60e2b4f7/members/c81f4e2a-6b97-4d35-a0e8-2f5b913d7c64 \
  -X DELETE \
  -H "Authorization: Bearer $MONICA_TOKEN"
```

```javascript
const response = await fetch('https://people.hansyeoh.com/api/v1/vaults/dunder-mifflin/groups/5d2a7c91-3e48-4b06-9f1d-a83c60e2b4f7/members/c81f4e2a-6b97-4d35-a0e8-2f5b913d7c64', {
  method: 'DELETE',
  headers: { Authorization: `Bearer ${token}` },
})
```

```php
$response = Http::withToken($token)->delete('https://people.hansyeoh.com/api/v1/vaults/dunder-mifflin/groups/5d2a7c91-3e48-4b06-9f1d-a83c60e2b4f7/members/c81f4e2a-6b97-4d35-a0e8-2f5b913d7c64');
```

## Response

`204`, with no body.
