Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
67 lines (52 loc) · 4.54 KB

File metadata and controls

67 lines (52 loc) · 4.54 KB

Save Room Settings

HTTP MethodURLRequires Auth
POST/api/v1/rooms.saveRoomSettingsyes

Body Parameters

KeyExample ValueDescription
rid*JZ8Y2dLfYhsg323RfThe room ID.
roomNameTest-Save-RoomThe name of the room.
roomDescriptionThis is a test room.The description of the room.
roomAvatardata:image/jpeg;base64,<base64 code of your image>The base64 image.
featuredtrueWhether the room is featured or not.
roomTopicDiscussion TopicThe topic of the room.
roomAnnouncementImportant AnnouncementThe announcement of the room.
roomCustomFields{ "field1": "value1" }The custom fields of the room.
roomType"c"The type of the room.
readOnlytrueWhether the room is read-only or not.
reactWhenReadOnlytrueWhether users can react when the room is read-only.
systemMessages["changed-room-name"]The system messages that the room supports.
defaulttrueWhether 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.
retentionEnabledtrueWhether retention is enabled for the room or not.
retentionMaxAge30The maximum age (in days) of messages to be retained in the room.
retentionExcludePinnedtrueWhether to exclude pinned messages from retention or not.
retentionFilesOnlytrueWhether to retain only files in the room or not.
retentionIgnoreThreadstrueWhether to ignore threads when retaining messages or not.
retentionOverrideGlobaltrueWhether to override the global retention settings for the room or not.
encryptedtrueWhether 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.

{% 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 %}

Change Log

Version Description
3.13.0 Added