Set Group as Read Only

Prev Next
Post
/api/v1/groups.setReadOnly

Set private channel as read-onlyor not. Permission required: edit-room

Changelog

Version Description
0.49.0 Added
Header parameters
X-Auth-Token
stringRequired

The authToken of the authenticated user.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired

The userId of the authenticated user.

ExamplerbAXPnMktTFbNpwtJ
Body parameters
Example
{
  "roomId": "ByehQjC44FwMei5LbX",
  "readOnly": true
}
object
roomId
string Required

The private group ID. You can find the IDs by using any of the following endpoints:

  • Get List of User Groups: This endpoint returns all private channels in the workspace, if you have the required permissions to view them.
  • Get Groups: This endpoint returns the private channels that you are a member of.
readOnly
boolean Required

Boolean to represent the group read-only status

Responses
200

OK

Success
{
  "group": {
    "_id": "ByehQjC44FwMei5LbX",
    "name": "testing-private",
    "t": "p",
    "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 All
object
group
object
_id
string
name
string
t
string
msgs
integer
u
object
_id
string
username
string
ts
string
ro
boolean
sysMes
boolean
_updatedAt
string
usernames
Array of string
string
joinCodeRequired
boolean
muted
Array of object
object
success
boolean
401

Unauthorized

Authorization Error
{
  "status": "error",
  "message": "You must be logged in to do this."
}
object
status
string
message
string