> ## 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 > 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 | | ---------------- | ------------| |9.0.0 | The `403` response returns `errorType: error-forbidden`. | |8.7.0 | Added | ## OpenAPI ````json POST /api/v1/permissions.removeRole { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "User Management" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "LDAP" }, { "name": "Permissions" }, { "name": "Roles" }, { "name": "Users" }, { "name": "SAML" } ], "paths": { "/api/v1/permissions.removeRole": { "post": { "tags": [ "Permissions" ], "summary": "Remove Role from Permission", "description": "Revoke a permission from a role. \n\nPermission required: `access-permissions`. \n\nTo modify a setting-level permission, the `access-setting-permissions` permission is also required.\n\n### Changelog\n| Version | Description |\n| ---------------- | ------------|\n|9.0.0 | The `403` response returns `errorType: error-forbidden`. |\n|8.7.0 | Added |", "operationId": "post-api-v1-permissions.removeRole", "parameters": [ { "$ref": "#/components/parameters/UserId" }, { "$ref": "#/components/parameters/Auth-Token" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "permissionId": { "type": "string", "description": "The permission ID.", "example": "create-team-channel" }, "role": { "type": "string", "description": "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.", "example": "user" } }, "required": [ "permissionId", "role" ] }, "examples": { "Example": { "value": { "permissionId": "create-team-channel", "role": "user" } } } } } }, "responses": { "200": { "$ref": "#/components/responses/trueSuccess" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" }, "errorType": { "type": "string" }, "details": { "type": "object", "properties": { "method": { "type": "string" } } } } }, "examples": { "Invalid Parameters": { "value": { "success": false, "error": "must have required property 'role'", "errorType": "error-invalid-params" } }, "Permission not found": { "value": { "success": false, "error": "Permission not found [error-permission-not-found]", "errorType": "error-permission-not-found", "details": { "method": "authorization:removeRoleFromPermission" } } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" }, "errorType": { "type": "string" } } }, "examples": { "Permission Error": { "value": { "success": false, "error": "User does not have the permissions required for this action", "errorType": "error-forbidden" } } } } } } } } } }, "components": { "parameters": { "UserId": { "name": "X-User-Id", "in": "header", "description": "The authenticated user ID.", "required": true, "schema": { "type": "string" }, "example": "rbAXPnMktTFbNpwtJ" }, "Auth-Token": { "name": "X-Auth-Token", "in": "header", "description": "The authenticated user token.", "required": true, "schema": { "type": "string" }, "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f" } }, "responses": { "trueSuccess": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } }, "examples": { "Success": { "value": { "success": true } } } } } }, "authorizationError": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "Authorization Error": { "value": { "success": false, "error": "You must be logged in to do this." } } } } } } } } } ````