---
title: REST API – Entity Relationships
description: "--- ## Add Related — Add a relationship This operation allows you to add an item to an entity's related lists. The related list must be of type `get_related_list` (and not `get_dependents_list`, as the latter are added automatically when the…"
url: "https://www.kafinea.com/en/help/api/rest-api-entity-relationships/"
updated: "2026-04-03"
category: API
---

# REST API – Entity Relationships

---

## Add Related — Add a relationship

This operation allows you to add an item to an entity's related lists. The related list must be of type `get_related_list` (and not `get_dependents_list`, as the latter are added automatically when the linked entity is created).

> **POST** `https://apps.kafinea.com/{instance}/webservice.php`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `operation` | string | yes | Must be `add_related` |
| `sessionName` | string | yes | Session ID |
| `sourceRecordId` | string | yes | Source entity Webservice ID |
| `relatedLabel` | string | yes | Linked module name |
| `relatedRecordId` | string | yes | Webservice ID of the entity to link |

**curl example:**

```bash
curl -X POST https://apps.kafinea.com/YourKafinea/webservice.php 
  -d "operation=add_related" 
  -d "sessionName=YOUR_SESSION_ID" 
  -d "sourceRecordId=21x3456" 
  -d "relatedLabel=Documents" 
  -d "relatedRecordId=15x7890"
```

---

## Related references 🔗

- [CRUD operations](https://www.kafinea.com/en/documentation/api/rest-api-crud-operations/)
- [Files](https://www.kafinea.com/en/documentation/api/rest-api-file-management/)
