---
title: "Create Relationship"
method: POST
path: "/api/inventory-linking/v1/inventories/relations"
tags: ["Inventory Relationships V2"]
---

# Create Relationship

`POST /api/inventory-linking/v1/inventories/relations`

Use this API to create a bidirectional link between an inventory and one or more other inventories.

## Request body

- LinkRequestDto
  - `sourceInventory` EntityIdAndType, required
    - `id` string, uuid, required — Entity id
    - `type` 'assets' | 'processing-activities' | 'vendors' | 'entities' | 'data-elements' | 'data-subjects', required — Entity type
  - `targetInventory` EntityIdAndType, required
    - `id` string, uuid, required — Entity id
    - `type` 'assets' | 'processing-activities' | 'vendors' | 'entities' | 'data-elements' | 'data-subjects', required — Entity type
  - `contextProcess` BasicEntityIdAndName
    - `id` string, uuid — Entity identifier
    - `name` string — Entity name
  - `attributes` object — Custom Attributes based on schema defined for given link type
  - `linkTypeName` string, required — Link type identifier
  - `linkTypeLabel` string, required — Link type label

## Response `201`

Relationship created successfully

- string, uuid

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `429` — Too Many Requests. For more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).
- `500` — Internal Server Error

---

[API](https://skmtc.net/onetrust/apis/platform-access-management.md) · [All operations](https://skmtc.net/onetrust/apis/platform-access-management/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/onetrust/platform-access-management/versions/21de3aa0b170/schema)
