# Room

### Create Room

```java
public String createRoom(String name, String topic, List<String> invitations)
```

Parameters：

| Name        | Type         | Description                 | Required |
| ----------- | ------------ | --------------------------- | -------- |
| name        | string       | room name                   | true     |
| topic       | string       | room topic                  | false    |
| invitations | string array | array of user ids to invite | false    |

Returns:

| Name   | Type   | Description        | Required |
| ------ | ------ | ------------------ | -------- |
| roomId | string | id of the new room | true     |

### Invite User

```java
public void inviteUser(String roomId, String userId, String reason)
```

Parameters：

| Name   | Type   | Description   | Required |
| ------ | ------ | ------------- | -------- |
| roomId | string | room id       | true     |
| userId | string | user id       | true     |
| reason | string | invite reason | false    |

Returns: none

### Kick User

```java
public void kickUser(String roomId, String userId, String reason)
```

Parameters：

| Name   | Type   | Description   | Required |
| ------ | ------ | ------------- | -------- |
| roomId | string | room id       | true     |
| userId | string | user id       | true     |
| reason | string | invite reason | false    |

Returns: none

### Join Room

```java
public void joinRoom(String roomID)
```

Parameters：

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

Returns: none

### Leave Room

```java
public void leaveRoom(String roomID)
```

Parameters：

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

Returns: none

### Get Room Memebers

```java
public List<Member> getRoomMembers(String roomID)
```

Parameters：

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

Returns:

| Name                 | Type   | Description         | Required |
| -------------------- | ------ | ------------------- | -------- |
| Member.id            | string | member user id      | true     |
| Member.display\_name | string | member display name | true     |
| Member.avatar\_url   | string | member avatar url   | 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/java-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.
