# Chat management

Create group chats, rename them, transfer ownership to another participant, and leave a chat.

**Scope:** `im` | **Base URL:** `https://vibecode.bitrix24.com/v1` | **Authorization:** `X-Api-Key`

## Operations

- [Create a chat](./management/create.md) — `POST /v1/chats`
- [Rename a chat](./management/rename.md) — `PATCH /v1/chats/:chatId`
- [Transfer ownership](./management/owner.md) — `POST /v1/chats/:chatId/owner`
- [Leave a chat](./management/leave.md) — `POST /v1/chats/:chatId/leave`

## Typical scenario

The owner cannot fully leave a chat they created: after leaving, they remain the owner. To leave for good, transfer ownership first, then leave the chat.

1. [Transfer ownership](/docs/chats/management/owner) to another participant.
2. [Leave the chat](/docs/chats/management/leave).

## See also

- [Chats and messages](/docs/chats)
- [Participants](/docs/chats/members)
