HTTP Method | URL | Requires Auth |
---|---|---|
POST | /api/v1/rooms.saveRoomSettings | yes |
Key | Example Value | Description |
---|---|---|
rid * | JZ8Y2dLfYhsg323Rf | The room ID. |
roomName | Test-Save-Room | The name of the room. |
roomDescription | This is a test room. | The description of the room. |
roomAvatar | data:image/jpeg;base64,<base64 code of your image> | The base64 image. |
featured | true | Whether the room is featured or not. |
roomTopic | Discussion Topic | The topic of the room. |
roomAnnouncement | Important Announcement | The announcement of the room. |
roomCustomFields | { "field1": "value1" } | The custom fields of the room. |
roomType | "c" | The type of the room. |
readOnly | true | Whether the room is read-only or not. |
reactWhenReadOnly | true | Whether users can react when the room is read-only. |
systemMessages | ["changed-room-name"] | The system messages that the room supports. |
default | true | Whether the room is the default room or not. |
joinCode | "123456" | The join code of the room. |
streamingOptions | { "type": "live" } | The streaming options of the room. |
retentionEnabled | true | Whether retention is enabled for the room or not. |
retentionMaxAge | 30 | The maximum age (in days) of messages to be retained in the room. |
retentionExcludePinned | true | Whether to exclude pinned messages from retention or not. |
retentionFilesOnly | true | Whether to retain only files in the room or not. |
retentionIgnoreThreads | true | Whether to ignore threads when retaining messages or not. |
retentionOverrideGlobal | true | Whether to override the global retention settings for the room or not. |
encrypted | true | Whether the room is encrypted or not. |
favorite | { "favorite": true, "defaultValue": false } | The favorite settings of the room. Whether the room is marked as favorite and whether it is set as the default room. |
curl -L -X POST 'http://localhost:3000/api/v1/rooms.saveRoomSettings' \
-H 'X-User-Id: d26x6zSkaPSe5gCyy' \
-H 'X-Auth-Token: Zu-Z6eKzIIz7MCCRGeHi29bYkXZCJ4SxFC0JAasqm92' \
-H 'Content-Type: application/json' \
--data-raw '{
"rid": "JZ8Y2dLfYhsg323Rf",
"roomName": "Test-Save-Room",
"roomDescription": "This is a test room."
}'
{
"rid": "JZ8Y2dLfYhsg323Rf",
"success": true
}
Any of the following errors can occur on the endpoint.
- Authorization: Requires an authentication token for the request to be made.
- Invalid Room: Occurs when the given
rid
is invalid.
{% tabs %} {% tab title=" Authorization" %}
{
"success": false,
"error": "unauthorized"
}
{% endtab %}
{% tab title="Invalid Room ID" %}
{
"success": false,
"error": "The required \"roomId\" or \"roomName\" param provided does not match any group [error-room-not-found]",
"errorType": "error-room-not-found"
}
}
{% endtab %} {% endtabs %}
Version | Description |
---|---|
3.13.0 | Added |