---
title: "Add ABAC attribute key to room"
slug: "add-abac-attribute-key-to-room"
status: "update"
updated: 2026-09-15T13:58:46Z
published: 2026-09-15T13:58:46Z
canonical: "developer.rocket.chat/add-abac-attribute-key-to-room"
---
> ## 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.
# Add ABAC attribute key to room
Post/api/v1/abac/rooms/:rid/attributes/:key
- Adds a single ABAC attribute key to a room.
- Creates a new ABAC attribute on the specified room for the given key, assigning it the provided values array; fails if the room already has this key or if the key/values are not allowed by the global attribute definition.
- 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.
Example 1
```json
{
"values": [
"asia"
]
}
```
object values Array of string string
Responses200
OK
Success
```json
{
"success": true
}
```
object successboolean
400
Bad Request
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"
}
```
Duplicate key on a room
```json
{
"success": false,
"error": "error-duplicate-attribute-key"
}
```
Cannot convert default room to ABAC
```json
{
"success": false,
"error": "error-cannot-convert-default-room-to-abac"
}
```
Room not found
```json
{
"success": false,
"error": "error-room-not-found"
}
```
object successboolean
errorstring
401
Unauthorized
Unauthorized login attempt
```json
{
"success": false,
"error": "error-unauthorized"
}
```
object successboolean
errorstring
403
Forbidden
Missing required ABAC permissions
```json
{
"success": false,
"error": "error-not-authorized"
}
```
object successboolean
errorstring