Skip to main content
POST
/
v1
/
records
/
{record_id}
/
relationships
Create a relationship instance
curl --request POST \
  --url https://app.nex.ai/api/developers/v1/records/{record_id}/relationships \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "definition_id": "789",
  "entity_1_id": "1001",
  "entity_2_id": "2002"
}
'
{
  "id": "5001",
  "definition_id": "789",
  "entity_1_id": "1001",
  "entity_2_id": "2002",
  "created_at": "2024-01-15T10:00:00Z"
}

Authorizations

Authorization
string
header
required

API key for authentication (format: "Bearer YOUR_API_KEY")

Path Parameters

record_id
integer
required

Record ID

Body

application/json

Relationship instance to create

definition_id
string
required

Relationship definition ID

entity_1_id
string
required

First record ID

entity_2_id
string
required

Second record ID

Response

Created relationship instance

id
string
definition_id
string
entity_1_id
string
entity_2_id
string
created_at
string<date-time>
Last modified on March 7, 2026