---
title: "Replace room ABAC attributes"
slug: "replace-room-abac-attributes"
updated: 2026-06-08T12:46:40Z
published: 2026-06-08T12:46:40Z
---

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

# Replace room ABAC attributes

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

- Replaces the full ABAC attribute set for a room.
- Sets the complete set of ABAC attributes on the specified room by providing an attributes object that maps attribute keys to arrays of allowed values; any previously assigned attributes not included in the request are removed.
- 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<select class='api-response-data' aria-label='Media type'><option value='96695174-be5b-4692-a5ca-978ac20bc5f2'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='3683d7ef-3651-40ca-84d7-2e1ca906a4e6'>Example 1</option>
</select>Example 1

```json
{
  "attributes": {
    "department": [
      "it",
      "sales"
    ],
    "region": [
      "asia",
      "europa"
    ]
  }
}
```

object  

Responses200

OK

<select class='api-response-data' aria-label='Media type'><option value='e8d5c722-d763-4ee1-bfee-d2c199d62cee'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='67a60e65-7e78-4c90-accb-42626fab0a0f'>Success</option>
</select>Success

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

object  successboolean    

400

Bad Request

<select class='api-response-data' aria-label='Media type'><option value='2fe70e16-600e-4568-9418-fcafcb2c9d16'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='ebe148ca-77ab-437c-a53d-a4df52c22f63'>ABAC not enabled</option>
<option value='cc543feb-aa40-4df6-870f-972b467861f6'>Attribute definition missing</option>
<option value='f93d75aa-4850-4712-8630-12873e40e2f0'>Invalid attribute values</option>
</select>ABAC not enabled

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

Attribute definition missing

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

Invalid attribute values

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

object  successboolean    
errorstring    

401

Unauthorized

<select class='api-response-data' aria-label='Media type'><option value='5ec38b4d-5330-4acb-8c59-f545cf11a581'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='062809d1-0cf0-4ad0-89b6-98906d84d626'>Authorization Error</option>
</select>Authorization Error

```json
{
  "status": "error",
  "message": "You must be logged in to do this."
}
```

object  statusstring    
messagestring    

403

Forbidden

<select class='api-response-data' aria-label='Media type'><option value='7ec49269-f15a-418d-a357-a00e19e485c0'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='530ef163-f851-4e9c-ad51-ff5616db7fd6'>Missing required ABAC permissions</option>
</select>Missing required ABAC permissions

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

object  successboolean    
errorstring
