---
title: "Set Channel ReadOnly"
slug: "set-channel-readonly"
updated: 2026-09-03T14:50:33Z
published: 2026-09-03T14:50:33Z
canonical: "developer.rocket.chat/set-channel-readonly"
stale: true
---
> ## Documentation Index
> Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt
> Use this file to discover all available pages before exploring further.
# Set Channel ReadOnly
Post/api/v1/channels.setReadOnly
Set a channel to be read-only or not. Permission required: `edit-room`
### Changelog
| Version | Description |
| --- | --- |
| 0.49.0 | Added |
Header parametersX-Auth-TokenstringRequired
The `authToken` of the authenticated user.
ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-IdstringRequired
The `userId` of the authenticated user.
ExamplerbAXPnMktTFbNpwtJ
Body parametersExample
```json
{
"roomId": "ByehQjC44FwMeiLbX",
"readOnly": true
}
```
object roomIdstring Required
The channel ID.
readOnlyboolean Required
Boolean of whether the room is read-only or not.
Responses200
OK
Success
```json
{
"channel": {
"_id": "ByehQjC44FwMeiLbX",
"name": "testing0",
"t": "c",
"msgs": 0,
"u": {
"_id": "aiPqNoGkjpNDiRx6d",
"username": "goose160"
},
"ts": "2017-01-05T18:02:50.754Z",
"ro": true,
"sysMes": true,
"_updatedAt": "2017-01-05T19:02:24.429Z",
"usernames": [
"goose160",
"graywolf336"
],
"joinCodeRequired": true,
"muted": []
},
"success": true
}
```
Expand Allobject channelobject _idstring
namestring
tstring
msgsinteger
uobject _idstring
usernamestring
tsstring
roboolean
sysMesboolean
_updatedAtstring
usernames Array of string string
joinCodeRequiredboolean
muted Array of object object
successboolean
401
Unauthorized
Authorization Error
```json
{
"status": "error",
"message": "You must be logged in to do this."
}
```
object statusstring
messagestring