---
title: "Set room ABAC attribute values"
slug: "set-room-abac-attribute-values"
updated: 2026-06-01T06:32:04Z
published: 2026-06-01T06:32:04Z
---

> ## 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

Put/api/v1/abac/rooms/:rid/attributes/:key![Defense](https://raw.githubusercontent.com/RocketChat/Rocket.Chat-Open-API/main/images/Defense.svg)

- 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. |

Header parametersX-Auth-TokenstringRequired

The `authToken` of the authenticated user.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-IdstringRequired

The `userId` of the authenticated user.

ExamplerbAXPnMktTFbNpwtJ

Body parameters

- Values (array of strings, required): The attribute values to assign for this key.
- Must have at least 1 item, max 10 items, and all values must be unique.

<select class='api-response-data' aria-label='Media type'><option value='c5354604-dd1d-4f4c-8de9-7be4a2726f37'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='14e8c099-478f-4ce2-838c-c3da7b8478fa'>Example 1</option>
</select>Example 1

```json
{
  "values": [
    "eng",
    "sales",
    "hr"
  ]
}
```

object  values Array of string   string    

Responses200

OK

<select class='api-response-data' aria-label='Media type'><option value='b910bdaf-567b-47f0-b88b-d4205034e9e3'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='60c74baf-d760-453a-bf4d-3e0ca7d688f8'>Success</option>
</select>Success

```json
{
  "success": true
}
```

object  successboolean    

400

Bad Request

<select class='api-response-data' aria-label='Media type'><option value='3856fac0-9898-47e4-9f3c-60885211b615'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='516df774-dd86-457e-818e-1c7e6736ed12'>Attribute definition missing</option>
<option value='3c86b69c-4b9a-4640-9046-c92a6d74cb22'>Invalid attribute values</option>
<option value='1e112c48-1bcb-43ad-b24a-038c70b4d1bd'>Room not found</option>
<option value='07a4adab-06f2-408f-bcba-0b4ca4c2546b'>Cannot convert default room to ABAC</option>
<option value='a8606e65-a79b-4b73-9275-0f651b7be61e'>ABAC not enabled</option>
</select>Attribute definition missing

```json
{
  "success": false,
  "error": "error-attribute-definition-not-found"
}
```

Invalid attribute values

```json
{
  "success": false,
  "error": "error-invalid-attribute-values"
}
```

Room not found

```json
{
  "success": false,
  "error": "error-room-not-found"
}
```

Cannot convert default room to ABAC

```json
{
  "success": false,
  "error": "error-cannot-convert-default-room-to-abac"
}
```

ABAC not enabled

```json
{
  "success": false,
  "error": "error-abac-not-enabled"
}
```

object  successboolean    
errorstring    

401

Unauthorized

<select class='api-response-data' aria-label='Media type'><option value='aa75412f-aa5a-4a1a-a49b-6246e404206e'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='e32e6ffd-1414-4fe3-b592-ce0d24f35b82'>Unauthorized login attempt</option>
</select>Unauthorized login attempt

```json
{
  "success": false,
  "error": "error-unauthorized"
}
```

object  successboolean    
errorstring    

403

Forbidden

<select class='api-response-data' aria-label='Media type'><option value='78759f10-1e9c-40c6-89db-cf80c584d124'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='24d32a31-878b-408b-9b6c-b5bab271efbc'>Missing required ABAC permissions</option>
</select>Missing required ABAC permissions

```json
{
  "success": false,
  "error": "error-not-authorized"
}
```

object  successboolean    
errorstring
