---
title: "Set ABAC attribute"
url: https://hexelstudio.com/docs/api/ciam-iam/abac/set-abac-attribute
---

# Set ABAC attribute

**POST** `/abac/attributes`

Sets an attribute of the caller's organization on an entity. Service users, groups and roles must belong to the caller's organization. Only the caller's organization's ABAC rules see the attribute.

## Headers

- `Authorization: string`

  `Bearer <token>`.

## Body parameters

- `attribute_key: optional string`

- `attribute_value: optional string`

- `created_at: optional string`

- `entity_id: optional string`

- `entity_type: optional string`

- `id: optional string`

- `organization_id: optional string`

- `updated_at: optional string`

- `value_type: optional string`

## Returns

`201` Created (`ABACAttribute`)

- `attribute_key: optional string`

- `attribute_value: optional string`

- `created_at: optional string`

- `entity_id: optional string`

- `entity_type: optional string`

- `id: optional string`

- `organization_id: optional string`

- `updated_at: optional string`

- `value_type: optional string`

## Errors

- `400` Bad Request
- `404` Not Found

## Example

```bash
curl --request POST \
  --url 'https://api.hexelstudio.com/v1/abac/attributes' \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
  "attribute_key": "string",
  "attribute_value": "string",
  "created_at": "2026-01-01T00:00:00Z",
  "entity_id": "string",
  "entity_type": "string",
  "id": "string",
  "organization_id": "string",
  "updated_at": "2026-01-01T00:00:00Z",
  "value_type": "string"
}'
```

### Response (201)

```json
{
  "attribute_key": "string",
  "attribute_value": "string",
  "created_at": "2026-01-01T00:00:00Z",
  "entity_id": "string",
  "entity_type": "string",
  "id": "string",
  "organization_id": "string",
  "updated_at": "2026-01-01T00:00:00Z",
  "value_type": "string"
}
```

### Response (400)

```json
{
  "key": "string"
}
```

### Response (404)

```json
{
  "key": "string"
}
```
