> For the complete documentation index, see [llms.txt](https://docs.api.intratool.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.api.intratool.de/api-reference/additional-attributes/attribute-fields.md).

# AttributeFields

## Introduction

`AttributeFields` define the input structure of an [AttributeSet](/api-reference/additional-attributes/attribute-sets.md).

They use `form_type` + `form_id` to reference their container set and support field-specific configuration through `config`.

Rich-text values in `default_value` and type-specific `config` keys use the shared [Rich Text](/introduction/rich-text.md) HTML format. This applies to the `rich-text` and `description` type values and the `privacy-policy` type's `config.text` value.

## Model Definition

**Alias**

`formField`

**Capabilities**

* [Translations](/introduction/resource-capabilities/translations.md) - Localizes `name`, `default_value`, `placeholder`, and `description`; examples use `en-US`.

**Relations**

| Relation                                                                                         | Key                | Type       | Relation Field(s)                      |
| ------------------------------------------------------------------------------------------------ | ------------------ | ---------- | -------------------------------------- |
| [AttributeSets](/api-reference/additional-attributes/attribute-sets.md)                          | `form`             | Belongs to | `form_id`, `form_type`                 |
| [AttributeFieldTypes](/api-reference/additional-attributes/attribute-field-types.md)             | `fieldType`        | Belongs to | `form_field_type_id`                   |
| [AttributeFieldValidations](/api-reference/additional-attributes/attribute-field-validations.md) | `fieldValidations` | Has many   | `form_field_validations.form_field_id` |

**User endpoints**

## List all fields

List visible `AttributeFields`.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/additional-attributes/fields`

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/additional-attributes/fields', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
[
  {
    "id": 27,
    "form_type": "attributeSet",
    "form_id": 11,
    "form_field_type_id": "text",
    "lang_id": "en-US",
    "name": "Employee Number",
    "config": {}
  },
  {
    "id": 29,
    "form_type": "attributeSet",
    "form_id": 11,
    "form_field_type_id": "entity-select",
    "lang_id": "en-US",
    "name": "Mentors",
    "config": {
      "entity_type": "user",
      "selectable_entities_filters": null,
      "representation": {
        "label_template": "{{first_name}} {{last_name}}",
        "result_template": null,
        "display": {
          "type": "select-modal",
          "config": null
        }
      }
    }
  }
]
```

## List fields by set

List visible `AttributeFields` for one `AttributeSet`.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/additional-attributes/sets/{formEntity}/fields`

**Route Parameters**

| Parameter    | Type      | Description      |
| ------------ | --------- | ---------------- |
| `formEntity` | `integer` | AttributeSet ID. |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/additional-attributes/sets/11/fields', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
[
  {
    "id": 27,
    "form_type": "attributeSet",
    "form_id": 11,
    "form_field_type_id": "text",
    "lang_id": "en-US",
    "name": "Employee Number",
    "config": {}
  },
  {
    "id": 28,
    "form_type": "attributeSet",
    "form_id": 11,
    "form_field_type_id": "datetime",
    "lang_id": "en-US",
    "name": "Start Date",
    "config": {
      "type": "date",
      "format": "Y-m-d"
    }
  }
]
```

## Show field

Show one visible `AttributeField`.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/additional-attributes/fields/{formField}`

**Route Parameters**

| Parameter   | Type      | Description |
| ----------- | --------- | ----------- |
| `formField` | `integer` | Field ID.   |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/additional-attributes/fields/27', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "id": 27,
  "form_type": "attributeSet",
  "form_id": 11,
  "form_field_type_id": "text",
  "lang_id": "en-US",
  "name": "Employee Number",
  "config": {}
}
```

**Entity-select endpoints**

The entity lists and filter-option lists in this group use [count-less pagination](/introduction/query-manipulation/result-control.md#count-less-pagination), so their `total` value is `null`.

## List preselected entities

List entities preselected for one `AttributeField`.

**Definition**

<mark style="color:yellow;">`POST`</mark> `/api/additional-attributes/fields/{formField}/preselected-entities`

**Route Parameters**

| Parameter   | Type      | Description             |
| ----------- | --------- | ----------------------- |
| `formField` | `integer` | Entity-select field ID. |

**Request Keys**

| Key        | Type      | Default        | Description                                                |
| ---------- | --------- | -------------- | ---------------------------------------------------------- |
| `page`     | `integer` | `1`            | Result page.                                               |
| `per_page` | `integer` | Server default | Results per page.                                          |
| `filter`   | `object`  | No filters     | Additional value filters applied to the selected entities. |

**Behavior**

Field `29` is configured as a user `entity-select`; its `default_value` contains user IDs `7` and `8`, which produce the two preselected entities below.

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/additional-attributes/fields/29/preselected-entities', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'page' => 1,
        'per_page' => 2
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "current_page": 1,
  "data": [
    {
      "id": 7,
      "title": "Ada Lovelace",
      "sub_title": "ada.lovelace",
      "description": "Engineering",
      "additional_data": {
        "group_account": false
      }
    },
    {
      "id": 8,
      "title": "Grace Hopper",
      "sub_title": "grace.hopper",
      "description": "Product",
      "additional_data": {
        "group_account": false
      }
    }
  ],
  "per_page": 2,
  "total": null
}
```

## List selectable entities

List entities selectable for one `AttributeField`.

**Definition**

<mark style="color:yellow;">`POST`</mark> `/api/additional-attributes/fields/{formField}/selectable-entities`

**Route Parameters**

| Parameter   | Type      | Description             |
| ----------- | --------- | ----------------------- |
| `formField` | `integer` | Entity-select field ID. |

**Request Keys**

| Key        | Type      | Default        | Description                                                         |
| ---------- | --------- | -------------- | ------------------------------------------------------------------- |
| `page`     | `integer` | `1`            | Result page.                                                        |
| `per_page` | `integer` | Server default | Results per page.                                                   |
| `filter`   | `object`  | No filters     | Additional value filters; configured field filters take precedence. |

**Behavior**

Field `29` uses `entity_type: user`. The request limits the page to the two users shown in the response.

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/additional-attributes/fields/29/selectable-entities', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'page' => 1,
        'per_page' => 2,
        'filter' => [
            'id' => [
                'in' => '7,8'
            ]
        ]
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "current_page": 1,
  "data": [
    {
      "id": 7,
      "title": "Ada Lovelace",
      "sub_title": "ada.lovelace",
      "description": "Engineering",
      "additional_data": {
        "group_account": false
      }
    },
    {
      "id": 8,
      "title": "Grace Hopper",
      "sub_title": "grace.hopper",
      "description": "Product",
      "additional_data": {
        "group_account": false
      }
    }
  ],
  "per_page": 2,
  "total": null
}
```

## List selectable-entity filters

List selectable-entity filters for one `AttributeField`.

**Definition**

<mark style="color:yellow;">`POST`</mark> `/api/additional-attributes/fields/{formField}/selectable-entities/filters`

**Route Parameters**

| Parameter   | Type      | Description             |
| ----------- | --------- | ----------------------- |
| `formField` | `integer` | Entity-select field ID. |

**Request Keys**

| Key      | Type     | Default    | Description                                                   |
| -------- | -------- | ---------- | ------------------------------------------------------------- |
| `filter` | `object` | No filters | Value filters used to calculate the available filter options. |

**Behavior**

The response is derived from field `29`'s user entity type and its configured selectable-entity filters.

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/additional-attributes/fields/29/selectable-entities/filters', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'filter' => [
            'id' => [
                'in' => '7,8'
            ]
        ]
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "data": [
    {
      "key": "role.department.id",
      "label": "Department",
      "type": "multi-select",
      "operators": [
        "in",
        "not_in"
      ],
      "options": {
        "values": [
          {
            "value": 5,
            "label": "Engineering",
            "additionalData": []
          },
          {
            "value": 9,
            "label": "Product",
            "additionalData": []
          }
        ],
        "filters": [],
        "endpoint": "role.department.id/options",
        "meta": {
          "total": 2,
          "hasMore": false
        }
      }
    },
    {
      "key": "group_account",
      "label": "Group account",
      "type": "multi-select",
      "operators": [
        "is"
      ],
      "options": {
        "values": [
          {
            "value": 1,
            "label": "Group account",
            "additionalData": []
          },
          {
            "value": 0,
            "label": "User",
            "additionalData": []
          }
        ],
        "filters": [],
        "endpoint": "group_account/options",
        "meta": {
          "total": 2,
          "hasMore": false
        }
      }
    }
  ]
}
```

## List selectable-entity filter options

List options for one selectable-entity filter of an `AttributeField`.

**Definition**

<mark style="color:yellow;">`POST`</mark> `/api/additional-attributes/fields/{formField}/selectable-entities/{filterKey}/options`

**Route Parameters**

| Parameter   | Type      | Description              |
| ----------- | --------- | ------------------------ |
| `formField` | `integer` | Entity-select field ID.  |
| `filterKey` | `string`  | Multi-select filter key. |

**Request Keys**

| Key        | Type      | Default        | Description                                      |
| ---------- | --------- | -------------- | ------------------------------------------------ |
| `page`     | `integer` | `1`            | Result page.                                     |
| `per_page` | `integer` | Server default | Results per page.                                |
| `filter`   | `object`  | No filters     | Value filters applied before option aggregation. |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/additional-attributes/fields/29/selectable-entities/role.department.id/options', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'page' => 1,
        'per_page' => 2,
        'filter' => [
            'id' => [
                'in' => '7,8'
            ]
        ]
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "current_page": 1,
  "data": [
    {
      "value": 5,
      "label": "Engineering",
      "additionalData": []
    },
    {
      "value": 9,
      "label": "Product",
      "additionalData": []
    }
  ],
  "per_page": 2,
  "total": null
}
```

**Administration endpoints**

The administration entity lists and filter-option lists also use [count-less pagination](/introduction/query-manipulation/result-control.md#count-less-pagination), so their `total` value is `null`.

## Admin: List preselected entities

List entities preselected for one `AttributeField` in administration scope.

**Definition**

<mark style="color:yellow;">`POST`</mark> `/api/administration/additional-attributes/fields/{formField}/preselected-entities`

**Route Parameters**

| Parameter   | Type      | Description             |
| ----------- | --------- | ----------------------- |
| `formField` | `integer` | Entity-select field ID. |

**Request Keys**

| Key        | Type      | Default        | Description                                                |
| ---------- | --------- | -------------- | ---------------------------------------------------------- |
| `page`     | `integer` | `1`            | Result page.                                               |
| `per_page` | `integer` | Server default | Results per page.                                          |
| `filter`   | `object`  | No filters     | Additional value filters applied to the selected entities. |

**Behavior**

Field `29` is configured as a user `entity-select`; its `default_value` contains user IDs `7` and `8`, which produce the two preselected entities below.

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/administration/additional-attributes/fields/29/preselected-entities', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'page' => 1,
        'per_page' => 2
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "current_page": 1,
  "data": [
    {
      "id": 7,
      "title": "Ada Lovelace",
      "sub_title": "ada.lovelace",
      "description": "Engineering",
      "additional_data": {
        "group_account": false
      }
    },
    {
      "id": 8,
      "title": "Grace Hopper",
      "sub_title": "grace.hopper",
      "description": "Product",
      "additional_data": {
        "group_account": false
      }
    }
  ],
  "per_page": 2,
  "total": null
}
```

## Admin: List selectable entities

List entities selectable for one `AttributeField` in administration scope.

**Definition**

<mark style="color:yellow;">`POST`</mark> `/api/administration/additional-attributes/fields/{formField}/selectable-entities`

**Route Parameters**

| Parameter   | Type      | Description             |
| ----------- | --------- | ----------------------- |
| `formField` | `integer` | Entity-select field ID. |

**Request Keys**

| Key        | Type      | Default        | Description                                                         |
| ---------- | --------- | -------------- | ------------------------------------------------------------------- |
| `page`     | `integer` | `1`            | Result page.                                                        |
| `per_page` | `integer` | Server default | Results per page.                                                   |
| `filter`   | `object`  | No filters     | Additional value filters; configured field filters take precedence. |

**Behavior**

Field `29` uses `entity_type: user`. The request limits the page to the two users shown in the response.

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/administration/additional-attributes/fields/29/selectable-entities', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'page' => 1,
        'per_page' => 2,
        'filter' => [
            'id' => [
                'in' => '7,8'
            ]
        ]
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "current_page": 1,
  "data": [
    {
      "id": 7,
      "title": "Ada Lovelace",
      "sub_title": "ada.lovelace",
      "description": "Engineering",
      "additional_data": {
        "group_account": false
      }
    },
    {
      "id": 8,
      "title": "Grace Hopper",
      "sub_title": "grace.hopper",
      "description": "Product",
      "additional_data": {
        "group_account": false
      }
    }
  ],
  "per_page": 2,
  "total": null
}
```

## Admin: List selectable-entity filters

List selectable-entity filters for one `AttributeField` in administration scope.

**Definition**

<mark style="color:yellow;">`POST`</mark> `/api/administration/additional-attributes/fields/{formField}/selectable-entities/filters`

**Route Parameters**

| Parameter   | Type      | Description             |
| ----------- | --------- | ----------------------- |
| `formField` | `integer` | Entity-select field ID. |

**Request Keys**

| Key      | Type     | Default    | Description                                                   |
| -------- | -------- | ---------- | ------------------------------------------------------------- |
| `filter` | `object` | No filters | Value filters used to calculate the available filter options. |

**Behavior**

The response is derived from field `29`'s user entity type and its configured selectable-entity filters.

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/administration/additional-attributes/fields/29/selectable-entities/filters', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'filter' => [
            'id' => [
                'in' => '7,8'
            ]
        ]
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "data": [
    {
      "key": "role.department.id",
      "label": "Department",
      "type": "multi-select",
      "operators": [
        "in",
        "not_in"
      ],
      "options": {
        "values": [
          {
            "value": 5,
            "label": "Engineering",
            "additionalData": []
          },
          {
            "value": 9,
            "label": "Product",
            "additionalData": []
          }
        ],
        "filters": [],
        "endpoint": "role.department.id/options",
        "meta": {
          "total": 2,
          "hasMore": false
        }
      }
    },
    {
      "key": "group_account",
      "label": "Group account",
      "type": "multi-select",
      "operators": [
        "is"
      ],
      "options": {
        "values": [
          {
            "value": 1,
            "label": "Group account",
            "additionalData": []
          },
          {
            "value": 0,
            "label": "User",
            "additionalData": []
          }
        ],
        "filters": [],
        "endpoint": "group_account/options",
        "meta": {
          "total": 2,
          "hasMore": false
        }
      }
    }
  ]
}
```

## Admin: List selectable-entity filter options

List options for one selectable-entity filter of an `AttributeField` in administration scope.

**Definition**

<mark style="color:yellow;">`POST`</mark> `/api/administration/additional-attributes/fields/{formField}/selectable-entities/{filterKey}/options`

**Route Parameters**

| Parameter   | Type      | Description              |
| ----------- | --------- | ------------------------ |
| `formField` | `integer` | Entity-select field ID.  |
| `filterKey` | `string`  | Multi-select filter key. |

**Request Keys**

| Key        | Type      | Default        | Description                                      |
| ---------- | --------- | -------------- | ------------------------------------------------ |
| `page`     | `integer` | `1`            | Result page.                                     |
| `per_page` | `integer` | Server default | Results per page.                                |
| `filter`   | `object`  | No filters     | Value filters applied before option aggregation. |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/administration/additional-attributes/fields/29/selectable-entities/role.department.id/options', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'page' => 1,
        'per_page' => 2,
        'filter' => [
            'id' => [
                'in' => '7,8'
            ]
        ]
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "current_page": 1,
  "data": [
    {
      "value": 5,
      "label": "Engineering",
      "additionalData": []
    },
    {
      "value": 9,
      "label": "Product",
      "additionalData": []
    }
  ],
  "per_page": 2,
  "total": null
}
```

## Admin: List all fields

List all `AttributeFields` in administration scope.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/administration/additional-attributes/fields`

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/administration/additional-attributes/fields', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
[
  {
    "id": 27,
    "form_type": "attributeSet",
    "form_id": 11,
    "form_field_type_id": "text",
    "lang_id": "en-US",
    "name": "Employee Number",
    "config": {}
  },
  {
    "id": 29,
    "form_type": "attributeSet",
    "form_id": 11,
    "form_field_type_id": "entity-select",
    "lang_id": "en-US",
    "name": "Mentor",
    "config": {
      "entity_type": "user",
      "selectable_entities_filters": null,
      "representation": {
        "label_template": "{{first_name}} {{last_name}}",
        "result_template": null,
        "display": {
          "type": "select-modal",
          "config": null
        }
      }
    }
  }
]
```

## Admin: List fields by set

List all `AttributeFields` for one `AttributeSet` in administration scope.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/administration/additional-attributes/sets/{formEntity}/fields`

**Route Parameters**

| Parameter    | Type      | Description      |
| ------------ | --------- | ---------------- |
| `formEntity` | `integer` | AttributeSet ID. |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/administration/additional-attributes/sets/11/fields', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
[
  {
    "id": 27,
    "form_type": "attributeSet",
    "form_id": 11,
    "form_field_type_id": "text",
    "lang_id": "en-US",
    "name": "Employee Number",
    "config": {}
  },
  {
    "id": 28,
    "form_type": "attributeSet",
    "form_id": 11,
    "form_field_type_id": "datetime",
    "lang_id": "en-US",
    "name": "Start Date",
    "config": {
      "type": "date",
      "format": "Y-m-d"
    }
  }
]
```

## Admin: Show field

Show one `AttributeField` in administration scope.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/administration/additional-attributes/fields/{formField}`

**Route Parameters**

| Parameter   | Type      | Description |
| ----------- | --------- | ----------- |
| `formField` | `integer` | Field ID.   |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/administration/additional-attributes/fields/27', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "id": 27,
  "form_type": "attributeSet",
  "form_id": 11,
  "form_field_type_id": "text",
  "lang_id": "en-US",
  "name": "Employee Number",
  "config": {}
}
```

## Admin: Create field

Create a new `AttributeField`.

**Definition**

<mark style="color:yellow;">`POST`</mark> `/api/administration/additional-attributes/fields`

**Request Keys**

| Key                    | Type      | Default             | Description                                                                                               |
| ---------------------- | --------- | ------------------- | --------------------------------------------------------------------------------------------------------- |
| `form_type`\*          | `string`  | -                   | Morph alias of container entity. For attribute fields use `attributeSet`.                                 |
| `form_id`\*            | `integer` | -                   | ID of the related [AttributeSet](/api-reference/additional-attributes/attribute-sets.md).                 |
| `form_field_type_id`\* | `string`  | -                   | Field type key from [AttributeFieldTypes](/api-reference/additional-attributes/attribute-field-types.md). |
| `lang_id`              | `string`  | system language     | Language key for translated values.                                                                       |
| `name`\*               | `string`  | -                   | Field label shown to users.                                                                               |
| `slug`                 | `string`  | derived from `name` | Technical slug. Sanitized automatically.                                                                  |
| `default_value`        | `mixed`   | `null`              | Static default value.                                                                                     |
| `placeholder`          | `string`  | `null`              | Placeholder text.                                                                                         |
| `description`          | `string`  | `null`              | Field description/help text.                                                                              |
| `hidden`               | `boolean` | `false`             | Hide field in UI.                                                                                         |
| `disabled`             | `boolean` | `false`             | Disable field input.                                                                                      |
| `config`               | `object`  | type defaults       | Type-specific configuration object.                                                                       |

Keys with `*` are required.

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/administration/additional-attributes/fields', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'form_type' => 'attributeSet',
        'form_id' => 11,
        'form_field_type_id' => 'text',
        'lang_id' => 'en-US',
        'name' => 'Employee Number'
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "status": "success",
  "data": {
    "id": 27,
    "form_type": "attributeSet",
    "form_id": 11,
    "form_field_type_id": "text",
    "lang_id": "en-US",
    "name": "Employee Number",
    "config": {},
    "hidden": false,
    "disabled": false
  }
}
```

## Admin: Update field

Update an existing `AttributeField`.

**Definition**

<mark style="color:blue;">`PUT`</mark> `/api/administration/additional-attributes/fields/{formField}`

**Route Parameters**

| Parameter   | Type      | Description                |
| ----------- | --------- | -------------------------- |
| `formField` | `integer` | ID of the field to update. |

**Request Keys**

| Key                  | Type      | Description                          |
| -------------------- | --------- | ------------------------------------ |
| `form_field_type_id` | `string`  | New field type key.                  |
| `lang_id`            | `string`  | New language key.                    |
| `name`               | `string`  | New field label.                     |
| `slug`               | `string`  | New technical slug.                  |
| `default_value`      | `mixed`   | New static default value.            |
| `placeholder`        | `string`  | New placeholder text.                |
| `description`        | `string`  | New help text.                       |
| `hidden`             | `boolean` | Update hidden state.                 |
| `disabled`           | `boolean` | Update disabled state.               |
| `config`             | `object`  | Updated type-specific configuration. |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('PUT', '/api/administration/additional-attributes/fields/27', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'lang_id' => 'en-US',
        'name' => 'Employee Number (updated)'
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "status": "success",
  "data": {
    "id": 27,
    "form_type": "attributeSet",
    "form_id": 11,
    "form_field_type_id": "text",
    "lang_id": "en-US",
    "name": "Employee Number (updated)",
    "config": {}
  }
}
```

## Admin: Delete field

Delete an existing `AttributeField`.

**Definition**

<mark style="color:red;">`DELETE`</mark> `/api/administration/additional-attributes/fields/{formField}`

**Route Parameters**

| Parameter   | Type      | Description |
| ----------- | --------- | ----------- |
| `formField` | `integer` | Field ID.   |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('DELETE', '/api/administration/additional-attributes/fields/27', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "status": "success",
  "data": {
    "count": 1
  }
}
```

The field administration endpoints are complemented by [AttributeFieldDefaultValueSources](/api-reference/additional-attributes/attribute-field-default-value-sources.md), [AttributeFieldValidations](/api-reference/additional-attributes/attribute-field-validations.md), and [AttributeFieldDisplayConditions](/api-reference/additional-attributes/attribute-field-display-conditions.md).
