Source: https://atomicwork-preview.docs-staging.pageloop.ai/api-reference/entities/postapi-v-1-entities-entity-type-display-id-links

# Link multiple entities at once

POST `https://{tenant}.atomicwork.com/api/v1/entities/{entity_type}/{display_id}/links`

Creates multiple relationships between the source entity and target entities.
Each link can be a different relationship type and direction.

## Authorization

#### X-Api-Key (header, string, required)

## Headers

#### X-Workspace-Id (header, string)

## Path Parameters

#### entity\_type (path, enum (string), required)

The entity type (e.g. REQUEST, CHANGE)

#### display\_id (path, string, required)

The display ID of the source entity (e.g. REQ-123, CHG-456)

## Body

#### reference\_key (body, string, required)

Reference key of the relationship (e.g., "relates", "blocks", "causes", or "implicit\_causes")

#### entities (body, array of object, required)

List of entity groups to link, each specifying a target entity type and its display IDs

#### properties

#### entity\_type (enum (string), required)

The entity type of the target display IDs

#### display\_ids (array of string, required)

List of target entity display IDs to link (e.g., REQ-123, CHG-456)

## Response

#### 200

Successful response

#### Request

```bash cURL
curl -X POST 'https://{tenant}.atomicwork.com/api/v1/entities/{entity_type}/{display_id}/links' \
  -H 'X-Api-Key: <api-key>' \
  -H 'Content-Type: application/json' \
  -d '{"reference_key": "string", "entities": [{"entity_type": "REQUEST", "display_ids": ["\u2026"]}]}'
```

```javascript JavaScript
const res = await fetch('https://{tenant}.atomicwork.com/api/v1/entities/{entity_type}/{display_id}/links', {
  method: 'POST',
  headers: {
    'X-Api-Key': '<api-key>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"reference_key": "string", "entities": [{"entity_type": "REQUEST", "display_ids": ["\u2026"]}]}),
});
const data = await res.json();
```

```python Python
import requests

res = requests.post(
    'https://{tenant}.atomicwork.com/api/v1/entities/{entity_type}/{display_id}/links',
    headers={'X-Api-Key': '<api-key>'},
    json={"reference_key": "string", "entities": [{"entity_type": "REQUEST", "display_ids": ["\u2026"]}]}
)
data = res.json()
```
