update-room
Modify access permissions and metadata for a Liveblocks room to control user and group access levels. Define public, read-only, or private settings for default, group, and user-specific access.
Instructions
Update a Liveblocks room
Input Schema
Name | Required | Description | Default |
---|---|---|---|
defaultAccesses | Yes | The default access permissions for the room. Permissions can be: 1. ["room:write"] // public 2. ["room:read", "room:presence:write"] // read-only 3. [] // private | |
groupsAccesses | No | The group ID accesses for the room. Permissions can be: 1. ["room:write"] // public 2. ["room:read", "room:presence:write"] // read-only 3. [] // private For example, when setting a "design" group to have full/public access: { design: ["room:write"] } Setting to null is used to remove an existing access level: { design: null } | |
metadata | No | ||
roomId | Yes | ||
usersAccesses | No | The user ID accesses for the room. Permissions can be: 1. ["room:write"] // public 2. ["room:read", "room:presence:write"] // read-only 3. [] // private For example, when setting "charlie" user ID to have full/public access: { charlie: ["room:write"] } Setting to null is used to remove an existing access level: { charlie: null } |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"defaultAccesses": {
"description": "The default access permissions for the room. Permissions can be: \n \n 1. [\"room:write\"] // public\n 2. [\"room:read\", \"room:presence:write\"] // read-only\n 3. [] // private \n ",
"items": {
"type": "string"
},
"type": "array"
},
"groupsAccesses": {
"additionalProperties": {
"items": {
"type": [
"string",
"null"
]
},
"type": "array"
},
"description": "\n The group ID accesses for the room. Permissions can be: \n \n 1. [\"room:write\"] // public\n 2. [\"room:read\", \"room:presence:write\"] // read-only\n 3. [] // private \n\n For example, when setting a \"design\" group to have full/public access:\n\n {\n design: [\"room:write\"]\n }\n\n Setting to null is used to remove an existing access level:\n\n {\n design: null\n }\n ",
"type": "object"
},
"metadata": {
"additionalProperties": {
"type": [
"string",
"null"
]
},
"type": "object"
},
"roomId": {
"type": "string"
},
"usersAccesses": {
"additionalProperties": {
"items": {
"type": [
"string",
"null"
]
},
"type": "array"
},
"description": "\n The user ID accesses for the room. Permissions can be: \n \n 1. [\"room:write\"] // public\n 2. [\"room:read\", \"room:presence:write\"] // read-only\n 3. [] // private \n\n For example, when setting \"charlie\" user ID to have full/public access:\n\n {\n charlie: [\"room:write\"]\n }\n\n Setting to null is used to remove an existing access level:\n\n {\n charlie: null\n }\n ",
"type": "object"
}
},
"required": [
"roomId",
"defaultAccesses"
],
"type": "object"
}