> ## 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 room ABAC attribute values >
Defense
- Sets the values of a single ABAC attribute on a room. - Replaces the existing values for the given attribute key on the specified room with the provided values array (or creates the attribute if it does not yet exist), enforcing the global attribute definition and ABAC validation rules. - Requires the ABAC license, the `abac-management` and `manage-abac-admin-rooms` permissions, and the global setting `ABAC_Enabled` to be turned on. ### Changelog | Version | Description | | ------- | ----------- | | 8.0.0 | Added | | 8.5.0 | Added the `manage-abac-admin-rooms` granular permission requirement. | ## OpenAPI ````json PUT /api/v1/abac/rooms/:rid/attributes/:key { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Rooms" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "Channels" }, { "name": "Directory" }, { "name": "Groups" }, { "name": "Rooms" }, { "name": "Teams" }, { "name": "Room Invites" }, { "name": "Subscriptions" }, { "name": "ABAC" } ], "paths": { "/api/v1/abac/rooms/:rid/attributes/:key": { "parameters": [], "put": { "summary": "Set room ABAC attribute values", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } }, "examples": { "Success": { "value": { "success": true } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "Attribute definition missing": { "value": { "success": false, "error": "error-attribute-definition-not-found" } }, "Invalid attribute values": { "value": { "success": false, "error": "error-invalid-attribute-values" } }, "Room not found": { "value": { "success": false, "error": "error-room-not-found" } }, "Cannot convert default room to ABAC": { "value": { "success": false, "error": "error-cannot-convert-default-room-to-abac" } }, "ABAC not enabled": { "value": { "success": false, "error": "error-abac-not-enabled" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "Unauthorized login attempt": { "value": { "success": false, "error": "error-unauthorized" } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "Missing required ABAC permissions": { "value": { "success": false, "error": "error-not-authorized" } } } } } } }, "operationId": "put-abac-rooms-rid-attributes-key", "description": "
\"Defense\"
\n\n- Sets the values of a single ABAC attribute on a room.\n- Replaces the existing values for the given attribute key on the specified room with the provided values array (or creates the attribute if it does not yet exist), enforcing the global attribute definition and ABAC validation rules.\n- Requires the ABAC license, the `abac-management` and `manage-abac-admin-rooms` permissions, and the global setting `ABAC_Enabled` to be turned on.\n\n### Changelog\n| Version | Description |\n| ------- | ----------- |\n| 8.0.0 | Added |\n| 8.5.0 | Added the `manage-abac-admin-rooms` granular permission requirement. |", "parameters": [ { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/UserId" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "values": { "type": "array", "items": { "type": "string" } } } }, "examples": { "Example 1": { "value": { "values": [ "eng", "sales", "hr" ] } } } } }, "description": "- Values (array of strings, required): The attribute values to assign for this key. \n- Must have at least 1 item, max 10 items, and all values must be unique." }, "tags": [ "ABAC" ] } } }, "components": { "parameters": { "Auth-Token": { "name": "X-Auth-Token", "in": "header", "description": "The `authToken` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f" }, "UserId": { "name": "X-User-Id", "in": "header", "description": "The `userId` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "rbAXPnMktTFbNpwtJ" } } } } ````