> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aiinsurance.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Manage entity field definitions for your company

## Overview

Configuration fields define the custom data fields that appear on entity forms (events, insureds, and policies). Each field has a definition specifying its type, key, display label, and optional configuration like select options or calculations.

These endpoints manage **entity fields** only. Rating fields, rating outputs, and rating presets are managed through separate `/configuration/rating/` endpoints.

## Key Concepts

* **fieldDefinition**: A JSON object defining the field's type (`className`), unique key, data path, and optional properties like label, section, and select options
* **entityName**: The entity type the field is associated with — `events`, `insureds`, or `policies`
* **className**: The field type — `InputField`, `SelectField`, `DateField`, `RadioSelect`, or `ExportResolvedField`

## API Endpoints

| Method | Endpoint                          | Description                                          |
| ------ | --------------------------------- | ---------------------------------------------------- |
| GET    | `/configuration/fields`           | List all entity fields with filtering and pagination |
| POST   | `/configuration/fields`           | Create a new entity field                            |
| DELETE | `/configuration/fields/{fieldId}` | Delete an entity field                               |

## Permissions

| Action       | Permission       |
| ------------ | ---------------- |
| List fields  | `company:read`   |
| Create field | `company:update` |
| Delete field | `company:update` |

## Field Definition Properties

| Property    | Type    | Required | Description                                                                                |
| ----------- | ------- | -------- | ------------------------------------------------------------------------------------------ |
| className   | string  | Yes      | Field type: `InputField`, `SelectField`, `DateField`, `RadioSelect`, `ExportResolvedField` |
| key         | string  | Yes      | Unique field key (cannot be `companyId`)                                                   |
| path        | string  | Yes      | Dot-notation path for the field value in entity data                                       |
| label       | string  | No       | Human-readable label                                                                       |
| section     | string  | No       | UI section grouping                                                                        |
| required    | boolean | No       | Whether the field is required                                                              |
| fields      | object  | No       | Sub-field configuration (e.g., select options)                                             |
| calculation | object  | No       | Calculation configuration for computed fields                                              |

## Example Response

```json theme={null}
{
  "items": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440100",
      "entityName": "policies",
      "fieldDefinition": {
        "className": "InputField",
        "key": "policyState",
        "path": "policyState",
        "label": "Policy State",
        "section": "Policy Information",
        "required": true
      },
      "createdAt": "2025-01-15T10:30:00.000Z",
      "updatedAt": "2025-01-20T14:00:00.000Z"
    }
  ],
  "totalCount": 1
}
```
