> ## 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 Events API allows you to manage events (claims and incidents) with company-configured dynamic fields. Unlike the standard Events 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:**

* Events have **two types**: `claim` and `incident`. Permissions are type-specific.
* 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., `lossDescription`, `lossDate`).
* Responses include a `fieldModelV1Data` object containing all field values (including base fields like `eventType` and `eventCoverageType`).
* Updates are **full replacements** — include all fields you want the event to have, not just the changed ones.

***

## Base Fields

These fields are handled specially by the API:

| Field               | Required | Description                                                                                                                                                                                                                                                                      |
| ------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `eventType`         | Yes      | `Claim` or `Incident` (case-insensitive)                                                                                                                                                                                                                                         |
| `eventCoverageType` | Yes      | Coverage type name string (e.g. `"Professional Liability"`, `"Board Defense"`)                                                                                                                                                                                                   |
| `eventInsureds`     | Yes      | Array of exposure IDs                                                                                                                                                                                                                                                            |
| `eventStatus`       | No       | `Open` (default) or `Closed` (case-insensitive)                                                                                                                                                                                                                                  |
| `eventReferenceId`  | No       | Auto-generated if omitted                                                                                                                                                                                                                                                        |
| `policyId`          | No       | Associated policy ID. Accepted at the top level of the request body for backwards compatibility; stored internally on the `eventPolicy` Join field inside `fieldModelV1Data`. Responses surface it both at the top level (`policyId`) and inside `fieldModelV1Data.eventPolicy`. |

***

## Configuration

Call `GET /v1/events/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                                                      |
| Date       | `object`             | `{ "date": "YYYY-MM-DD", "timezone": "America/New_York" }` — not a plain string |
| Object     | `object`             | Nested object                                                                   |

***

## API Endpoints

* **[Get Configuration](/api-reference/field-model-events/get-event-configuration)** - JSON Schema of available fields
* **[Create Event](/api-reference/field-model-events/create-event)** - Create a new event
* **[List Events](/api-reference/field-model-events/list-events)** - Paginated list with filtering and sorting
* **[Get Event](/api-reference/field-model-events/get-event)** - Retrieve a single event by ID
* **[Update Event](/api-reference/field-model-events/update-event)** - Full replacement update (PUT)
* **[Delete Event](/api-reference/field-model-events/delete-event)** - Delete with type-based permission

See also: **[Event Financials](/api-v1-reference/event-financials/overview)** for reserves and expected totals endpoints.

***

## Permissions

Permissions are **type-specific** for create, update, and delete operations.

| Operation         | Required Permission                                 |
| ----------------- | --------------------------------------------------- |
| Get Configuration | `company.event:export`                              |
| List Events       | `company.event:export`                              |
| Get Event         | `company.event:export`                              |
| Create Event      | `company.claim:create` or `company.incident:create` |
| Update Event      | `claim:update` or `incident:update`                 |
| Delete Event      | `company.claim:delete` or `company.incident:delete` |

***

## Example Create Request

```json theme={null}
{
  "eventType": "Claim",
  "eventCoverageType": "Professional Liability",
  "eventInsureds": ["550e8400-e29b-41d4-a716-446655440200"],
  "policyId": "550e8400-e29b-41d4-a716-446655440100",
  "lossDescription": "Water damage to building",
  "lossDate": { "date": "2025-01-10", "timezone": "America/New_York" }
}
```

## Example Response

```json theme={null}
{
  "id": "550e8400-e29b-41d4-a716-446655440300",
  "companyId": "550e8400-e29b-41d4-a716-446655440000",
  "policyId": "550e8400-e29b-41d4-a716-446655440100",
  "lawsuitId": null,
  "fieldModelV1Data": {
    "eventType": "Claim",
    "eventCoverageType": "Professional Liability",
    "eventPolicy": "550e8400-e29b-41d4-a716-446655440100",
    "lossDescription": "Water damage to building",
    "lossDate": { "date": "2025-01-10", "timezone": "America/New_York" }
  },
  "createdAt": "2025-01-15T10:30:00.000Z",
  "createdBy": "google-oauth2|123456789",
  "updatedAt": null,
  "updatedBy": null
}
```

The top-level `policyId` and `fieldModelV1Data.eventPolicy` always reflect the same value — `policyId` is a convenience alias preserved for backwards compatibility.
