Save Room Settings

HTTP MethodURLRequires Auth

POST

/api/v1/rooms.saveRoomSettings

Body Parameters

KeyExample ValueDescription

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.

Example Call

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."
}'

Example Response

Success

{
    "rid": "JZ8Y2dLfYhsg323Rf",
    "success": true
}

Error

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.

{
    "success": false,
    "error": "unauthorized"
}

Change Log

VersionDescription

3.13.0

Added

Last updated

Rocket.Chat versions receive support for six months after release.