> ## 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

The Field Model V1 Exposures API allows you to manage exposures with company-configured dynamic fields. Unlike the standard Exposures API where fields are fixed, Field Model V1 companies define their own fields per entity type — the set of available fields is configured per company.

**Key Concepts:**

* Fields are **dynamically defined** per company. Use the [Configuration endpoint](#configuration) to discover available fields and their types.
* The request body for create and update is a **flat JSON object** where keys are field `referenceId`s (e.g., `exposureName`, `numberOfEmployees`).
* Responses include a `fieldModelV1Data` object containing all field values (including base fields like `exposureName` and `exposureType`).
* Updates are **full replacements** — include all fields you want the exposure to have, not just the changed ones.

***

## Configuration

Call `GET /v1/exposures/configuration` to get a JSON Schema of available fields for your company. The schema includes:

* **Field types:** `string`, `number`, `boolean`, `object`
* **Option Set fields:** include an `enum` array of valid values
* **Required fields:** listed in the `required` array

***

## Field Types

| FMV1 Type  | JSON Type            | Description                |
| ---------- | -------------------- | -------------------------- |
| Text       | `string`             | Free-text string           |
| Number     | `number`             | Numeric value              |
| Boolean    | `boolean`            | True/false                 |
| Option Set | `string` or `number` | Constrained to enum values |
| Object     | `object`             | Nested object              |

***

## API Endpoints

* **[Get Configuration](/api-reference/field-model-exposures/get-exposure-configuration)** - JSON Schema of available fields
* **[Create Exposure](/api-reference/field-model-exposures/create-exposure)** - Create a new exposure
* **[List Exposures](/api-reference/field-model-exposures/list-exposures)** - Paginated list with filtering and sorting
* **[Get Exposure](/api-reference/field-model-exposures/get-exposure)** - Retrieve a single exposure by ID
* **[Update Exposure](/api-reference/field-model-exposures/update-exposure)** - Full replacement update (PUT)
* **[Delete Exposure](/api-reference/field-model-exposures/delete-exposure)** - Soft delete

***

## Permissions

| Operation         | Required Permission      |
| ----------------- | ------------------------ |
| Get Configuration | `company.insured:read`   |
| List Exposures    | `company.insured:read`   |
| Get Exposure      | `company.insured:read`   |
| Create Exposure   | `company.insured:create` |
| Update Exposure   | `insured:update`         |
| Delete Exposure   | `insured:delete`         |

***

## Filtering

| Parameter      | Type                   | Description                                                           |
| -------------- | ---------------------- | --------------------------------------------------------------------- |
| `id`           | `string` or `string[]` | Filter by exposure ID (single or array)                               |
| `exposureType` | `string`               | Filter by exposure type                                               |
| `entityType`   | `string`               | **Deprecated.** Alias for `exposureType` — use `exposureType` instead |
| `filterText`   | `string`               | Text search across exposure name                                      |

***

## Sorting

| Value          | Description                              |
| -------------- | ---------------------------------------- |
| `createdAt`    | Sort by creation date (default)          |
| `updatedAt`    | Sort by last update date                 |
| `exposureName` | Sort by exposure name                    |
| `exposureType` | Sort by exposure type                    |
| `name`         | **Deprecated.** Alias for `exposureName` |
| `entityType`   | **Deprecated.** Alias for `exposureType` |

Use the `sortDirection` parameter (`asc` or `desc`) to control sort order.

***

## Example Create Request

```json theme={null}
{
  "exposureName": "Acme Corporation",
  "exposureType": "business",
  "numberOfEmployees": 150,
  "riskLevel": "Medium"
}
```

## Example Response

```json theme={null}
{
  "id": "550e8400-e29b-41d4-a716-446655440200",
  "companyId": "550e8400-e29b-41d4-a716-446655440000",
  "fieldModelV1Data": {
    "exposureName": "Acme Corporation",
    "exposureType": "business",
    "numberOfEmployees": 150,
    "riskLevel": "Medium"
  },
  "createdAt": "2025-01-15T10:30:00.000Z",
  "updatedAt": null,
  "createdBy": "google-oauth2|123456789",
  "updatedBy": null
}
```
