---
title: "Create ABAC attribute definition"
slug: "create-abac-attribute-definition"
status: "update"
updated: 2026-09-15T13:59:07Z
published: 2026-09-15T13:59:07Z
canonical: "developer.rocket.chat/create-abac-attribute-definition"
---
> ## 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.
# Create ABAC attribute definition
Post/api/v1/abac/attributes
- Creates a new ABAC attribute definition.
- Registers a global ABAC attribute by specifying its key and the list of allowed values, making it available for use on rooms and users.
- Requires the ABAC license, the `abac-management` and `manage-abac-admin-room-attributes` 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-room-attributes` 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 parametersExample 1
```json
{
"key": "my_department",
"values": [
"eng",
"sales",
"hr",
"it"
]
}
```
object keystring
values Array of string string
Responses200
OK
Success
```json
{
"success": true
}
```
object successboolean
400
Bad Request
ABAC disabled
```json
{
"success": false,
"error": "error-abac-not-enabled"
}
```
Invalid attribute values
```json
{
"success": false,
"error": "error-invalid-attribute-values"
}
```
Invalid attribute key
```json
{
"success": false,
"error": "error-invalid-attribute-key"
}
```
Duplicate attribute key
```json
{
"success": false,
"error": "error-duplicate-attribute-key"
}
```
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