Post
/api/v1/rooms.muteUser
Mute a particular user in a room. Permission required: mute-user
. The room becomes read-only for the muted user. They can still view messages but cannot send any until unmuted.
Changelog
Version | Description |
---|---|
6.8.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
object
userId
string Required
The user that you want to mute. Alternatively, use the username
parameter and enter the username as the value.
ExampleCkCPNfjfhiwWLqC
roomId
string Required
The room ID.
ExampleJZ8Y2dLfYhsg323Rf
Responses
200
OK
Success
{
"success": true
}
object
success
boolean
400
Bad Request
Invalid User
{
"success": false,
"error": "The required \"userId\" or \"username\" param provided does not match any users [error-invalid-user]",
"errorType": "error-invalid-user"
}
Invalid Params
{
"success": false,
"error": "must have required property 'userId'\n must have required property 'username'\n must match exactly one schema in oneOf [invalid-params]",
"errorType": "invalid-params"
}
object
success
boolean
error
string
errorType
string
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}
object
status
string
message
string