Skip to main content
PUT
/
api
/
v1
/
external
/
companies
/
{companyId}
/
custom-objects
/
{objectType}
/
{objectId}
/
relationships
/
{fieldRefId}
/
{targetId}
Add Custom Object Relationship
curl --request PUT \
  --url https://app.aiinsurance.io/api/v1/external/companies/{companyId}/custom-objects/{objectType}/{objectId}/relationships/{fieldRefId}/{targetId} \
  --header 'Authorization: <api-key>'
{
  "objectId": "550e8400-e29b-41d4-a716-446655440020",
  "fieldRefId": "ownerExposure",
  "targetId": "550e8400-e29b-41d4-a716-446655440200",
  "created": true
}

Authorizations

Authorization
string
header
required

API key authentication. Include your API key in the Authorization header.

Path Parameters

companyId
string<uuid>
required

Company identifier

objectType
string
required

Custom object type in snake_case format (e.g., vehicle, building_info)

objectId
string<uuid>
required

Custom object identifier

fieldRefId
string
required

Relationship field reference ID from the configuration endpoint

targetId
string<uuid>
required

Target custom object identifier to link or unlink

Response

Relationship added (or already existed)

objectId
string<uuid>

The source custom object ID

fieldRefId
string

The relationship field reference ID

targetId
string<uuid>

The target entity ID

created
boolean

true if a new link was created, false if the exact link already existed.