> ## 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 Exposures API allows you to manage exposure entities for your company. Exposures represent the individuals or organizations that are covered by insurance policies.

**Key Concepts:**

* Exposures are entities (individuals or organizations) covered by insurance policies
* Each exposure has a **name** and **entityType** that classify them
* Exposures can be associated with policies and events
* Deleting an exposure performs a soft delete (the record is marked as deleted but retained)

***

## API Endpoints

* **[List Exposures](/api-reference/exposures/list-exposures)** - Retrieve paginated list of exposures with filtering and sorting
* **[Get Exposure](/api-reference/exposures/get-exposure)** - Retrieve a single exposure by ID
* **[Create Exposure](/api-reference/exposures/create-exposure)** - Create a new exposure
* **[Update Exposure](/api-reference/exposures/update-exposure)** - Update an existing exposure
* **[Delete Exposure](/api-reference/exposures/delete-exposure)** - Soft delete an exposure by ID

***

## Exposure Fields

| Field             | Type     | Required | Description                                                    |
| ----------------- | -------- | -------- | -------------------------------------------------------------- |
| `id`              | uuid     | -        | Exposure identifier (returned in responses)                    |
| `name`            | string   | Yes      | Name of the exposure                                           |
| `entityType`      | string   | Yes      | Entity type (e.g., "individual", "organization", "dealership") |
| `email`           | string   | No       | Exposure email address                                         |
| `phoneNumber`     | string   | No       | Exposure phone number                                          |
| `billingEmail`    | string   | No       | Billing email address                                          |
| `defaultBrokerId` | uuid     | No       | Default broker ID for this exposure                            |
| `policyIds`       | uuid\[]  | -        | IDs of associated policies (returned in list responses)        |
| `createdAt`       | datetime | -        | When the exposure was created                                  |

***

## Filtering and Sorting (List)

### Filter Parameters

| Parameter    | Type            | Description                             |
| ------------ | --------------- | --------------------------------------- |
| `id`         | uuid or uuid\[] | Filter by exposure ID (single or array) |
| `entityType` | string          | Filter by entity type                   |
| `filterText` | string          | Text search across exposure name        |

### Sorting Parameters

| Parameter       | Type   | Default     | Description                                          |
| --------------- | ------ | ----------- | ---------------------------------------------------- |
| `sortBy`        | string | `createdAt` | Field to sort by (`createdAt`, `name`, `entityType`) |
| `sortDirection` | string | `desc`      | Sort direction (`asc` or `desc`)                     |

***

## Permissions

Access to exposures requires the appropriate permissions based on your API key:

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

***

## Example List Response

```json theme={null}
{
  "items": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440200",
      "name": "John Smith",
      "entityType": "individual",
      "policyIds": ["550e8400-e29b-41d4-a716-446655440100"],
      "createdAt": "2025-01-15T10:30:00.000Z"
    }
  ],
  "totalCount": 1
}
```

## Example Create Request

```json theme={null}
{
  "name": "Acme Manufacturing GmbH",
  "entityType": "organization"
}
```

## Example Create Response

```json theme={null}
{
  "id": "550e8400-e29b-41d4-a716-446655440003"
}
```

## Example Update Request

```json theme={null}
{
  "name": "John Smith Jr.",
  "email": "john.smith@example.com"
}
```

## Example Update Response

```json theme={null}
{
  "id": "550e8400-e29b-41d4-a716-446655440200",
  "companyId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "John Smith Jr.",
  "entityType": "individual",
  "phoneNumber": null,
  "email": "john.smith@example.com",
  "billingEmail": null,
  "defaultBrokerId": null,
  "createdAt": "2025-01-15T10:30:00.000Z",
  "createdBy": "google-oauth2|123456789",
  "updatedAt": "2025-01-20T14:00:00.000Z",
  "updatedBy": "google-oauth2|987654321"
}
```

## Example Delete Response

```json theme={null}
{
  "id": "550e8400-e29b-41d4-a716-446655440002",
  "deleted": true
}
```

***
