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.

Remove Role from Permission

Prev Next
Post
/api/v1/permissions.removeRole

Revoke a permission from a role.

Permission required: access-permissions.

To modify a setting-level permission, the access-setting-permissions permission is also required.

Changelog

Version Description
8.7.0 Added
Header parameters
X-User-Id
stringRequired

The authenticated user ID.

ExamplerbAXPnMktTFbNpwtJ
X-Auth-Token
stringRequired

The authenticated user token.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
Body parameters
Example
{
  "permissionId": "create-team-channel",
  "role": "user"
}
object
permissionId
string Required

The permission ID.

Examplecreate-team-channel
role
string Required

The role to revoke the permission from. For default Rocket.Chat roles, enter the role name, such as admin or user. For custom roles, enter the role ID.

Exampleuser
Responses
200

OK

Success
{
  "success": true
}
object
success
boolean
400

Bad Request

Invalid Parameters
{
  "success": false,
  "error": "must have required property 'role'",
  "errorType": "invalid-params"
}
Permission not found
{
  "success": false,
  "error": "Permission not found [error-permission-not-found]",
  "errorType": "error-permission-not-found",
  "details": {
    "method": "authorization:removeRoleFromPermission"
  }
}
Expand All
object
success
boolean
error
string
errorType
string
details
object
method
string
401

Unauthorized

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

Forbidden

Permission Error
{
  "success": false,
  "error": "User does not have the permissions required for this action [error-unauthorized]"
}
object
success
boolean
error
string