> For the complete documentation index, see [llms.txt](https://docs.tnid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tnid.com/api-reference/001_user/007_groups/008__leave_group.md).

# Leave Group

GraphQL endpoint: `/user`

Removes the calling user's own membership from a group they belong to. The last remaining admin of a group cannot leave it.

## Query

```graphql
mutation ($groupId: ID!) {
  leaveGroup(groupId: $groupId) {
    status
  }
}

```

## Variables

```json
{
  "groupId": "00000000-0000-4000-8000-000000000001"
}
```

## Response

```json
{
  "data": {
    "leaveGroup": {
      "status": "OK"
    }
  }
}
```
