# Room

### Join a room

```cpp
joinRoomById(std::string roomId)
```

Parameters:

| Name   | Type   | Description     | Required |
| ------ | ------ | --------------- | -------- |
| roomId | string | Room\_id string | true     |

### Create a room

```cpp
createRoom(RoomVisibility v,
                            std::optional<std::string> name = {},
                            std::optional<std::string> alias = {},
                            immer::array<std::string> invite = {},
                            std::optional<bool> isDirect = {},
                            bool allowFederate = true,
                            std::optional<std::string> topic = {},
                            JsonWrap powerLevelContentOverride = json::object())
```

### Get room information

```cpp
Room room(std::string id)
```

Parameters:

| Name   | Type   | Description    | Required |
| ------ | ------ | -------------- | -------- |
| roomId | string | room ID string | true     |

### Invite user to a room

```cpp
Room::invite(std::string userId)
```

Parameters:

| Name   | Type   | Description   | Required |
| ------ | ------ | ------------- | -------- |
| userId | string | userId string | true     |

### Leave a room

```cpp
Room::leave()
```

### Change room name

```cpp
Room::setName(std::string name)
```

Parameters:

| Name | Type   | Description      | Required |
| ---- | ------ | ---------------- | -------- |
| name | string | Room name string | true     |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sending-network.gitbook.io/sending.network/sdk-documentation/unreal-sdk/room.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
