Skip to main content
PATCH
/
api
/
external
/
companies
/
{companyId}
/
events
/
{eventId}
curl --request PATCH \
  --url https://app.aiinsurance.io/api/external/companies/{companyId}/events/{eventId} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "requestorEmail": "[email protected]",
  "type": "claim",
  "status": "closed"
}
'
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"companyId": "550e8400-e29b-41d4-a716-446655440000",
"type": "claim",
"status": "closed",
"referenceId": "CLM-2025-001",
"coverageTypeId": "general_liability",
"policyId": "550e8400-e29b-41d4-a716-446655440100",
"insuredIds": [
"550e8400-e29b-41d4-a716-446655440200"
],
"createdAt": "2025-01-15T10:30:00.000Z",
"createdBy": "google-oauth2|123456789",
"updatedAt": "2025-01-20T09:00:00.000Z",
"data": {
"eventDescription": "Vehicle accident at intersection",
"claimAmount": "75000"
}
}

Authorizations

Authorization
string
header
required

Use format: ApiKey <your-api-key>

Path Parameters

companyId
string<uuid>
required

Company identifier

eventId
string<uuid>
required

Event identifier

Body

application/json
requestorEmail
string<email>
required

Email of the user making the request (for audit trail, must match existing user)

type
enum<string>
required

Type of event (claim or incident)

Available options:
claim,
incident
status
enum<string>

Status of the event

Available options:
open,
closed
coverageTypeId
string

Update coverage type

policyId
string<uuid> | null

Update associated policy (null to remove)

insuredIds
string<uuid>[]

Update associated insureds (replaces existing)

data
object

Update custom entity data (merged with existing)

Response

Event updated successfully

An event (claim or incident) in the system

id
string<uuid>

Event identifier

companyId
string<uuid>

Company identifier

type
enum<string>

Type of event (claim or incident)

Available options:
claim,
incident
status
enum<string>

Status of the event

Available options:
open,
closed
referenceId
string

Human-readable reference ID for the event

Example:

"CLM-2025-001"

coverageTypeId
string

Coverage type identifier for this event

Example:

"general_liability"

policyId
string<uuid> | null

Associated policy ID (null if not linked to a policy)

insuredIds
string<uuid>[]

IDs of insureds associated with this event

createdAt
string<date-time>

When the event was created (ISO 8601)

createdBy
string | null

User ID who created the event (null if not tracked)

updatedAt
string<date-time> | null

When the event was last updated (ISO 8601), or null if never updated

data
object

Custom entity data with field keys mapped to values. Returns null when no custom data exists.

Example:
{
"eventDescription": "Vehicle accident at intersection",
"claimAmount": "50000",
"dateOfLoss": "2025-01-10"
}