Skip to main content
PATCH
/
api
/
external
/
companies
/
{companyId}
/
v1
/
exposures
/
{exposureId}
Update Exposure
curl --request PATCH \
  --url https://app.aiinsurance.io/api/external/companies/{companyId}/v1/exposures/{exposureId} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "exposureName": "Acme Corp (Updated)",
  "exposureType": "business",
  "numberOfEmployees": 200,
  "riskLevel": "High"
}
'
{
  "id": "550e8400-e29b-41d4-a716-446655440200",
  "companyId": "550e8400-e29b-41d4-a716-446655440000",
  "fieldModelV1Data": {
    "exposureName": "Acme Corp (Updated)",
    "exposureType": "business",
    "numberOfEmployees": 200,
    "riskLevel": "High"
  },
  "policyIds": [
    "550e8400-e29b-41d4-a716-446655440100"
  ],
  "createdAt": "2025-01-15T10:30:00.000Z",
  "updatedAt": "2025-01-20T14:00:00.000Z",
  "createdBy": "google-oauth2|123456789",
  "updatedBy": "google-oauth2|987654321"
}

Authorizations

Authorization
string
header
required

API key authentication. Include your key in the Authorization header: Authorization: ApiKey YOUR-API-KEY

Path Parameters

companyId
string<uuid>
required

Company identifier

exposureId
string<uuid>
required

Exposure identifier

Body

application/json

Flat JSON object with field referenceIds as keys (full replacement)

Response

Exposure updated successfully

A Field Model V1 exposure entity with dynamic field data.

id
string<uuid>
required

Exposure identifier

companyId
string<uuid>
required

Company identifier

fieldModelV1Data
object
required

Dynamic field data for the exposure. Keys are field referenceIds defined in the company's field configuration. Includes base fields like exposureName and exposureType as well as any custom fields.

policyIds
string<uuid>[]
required

IDs of associated policies

createdAt
string<date-time> | null

When the exposure was created

updatedAt
string<date-time> | null

When the exposure was last updated

createdBy
string | null

User ID who created the exposure

updatedBy
string | null

User ID who last updated the exposure