---
title: "Create Relationship"
method: POST
path: "/api/inventory-linking/v1/relationship"
tags: ["Relationship Management"]
---

# Create Relationship

`POST /api/inventory-linking/v1/relationship`

## Request

- Base URL: `https://hostname`
- URL: `https://hostname/api/inventory-linking/v1/relationship`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://{hostname}/api/access/v1/oauth/token` scopes: `INVENTORY`, `INVENTORY_WRITE`

Use this API to create a Relationship Record between inventories (Assets, Vendors, Processing Activities, and Entities).

## Request body

- RelationshipCreateRequest
  - `entity1` EntityIdAndType
    - `id` string, uuid, required: Entity id
    - `type` 'assets' | 'processing-activities' | 'vendors' | 'entities' | 'data-elements' | 'data-subjects', required: Entity type
  - `entity2` EntityIdAndType
    - `id` string, uuid, required: Entity id
    - `type` 'assets' | 'processing-activities' | 'vendors' | 'entities' | 'data-elements' | 'data-subjects', required: Entity type
  - `additionalFields` object: Additional non attribute details associated with relationship
  - `relationshipLabel` RelationshipTypeLabelRequest
    - `labelName` 'sends data to' | 'is related to' | 'is controller of' | 'is source/collection point of' | 'is destination/access point of' | 'is storage/processing point of' | 'is joint controller of' | 'is processor of' | 'is subprocessor of' | 'sells data to' | 'is product/service provider of' | 'is representative of' | 'is sale recipient of' | 'receives data from' | 'is related to' | 'is controlled by' | 'has source/collection point of' | 'has destination/access point of' | 'has storage/processing point of' | 'is jointly controlled by' | 'is processed by' | 'is subprocessed by' | 'buys data from' | 'is provided by' | 'is represented by' | 'initiates sale to' | 'Parent-Of, Child-Of', required: Forward/Backward Relationship Label
    - `relationshipTypeRequest` RelationshipTypeRequest
      - `relationshipTypeId` string, uuid: Id of the Relationship Type
      - `relationshipTypeName` 'Data Transfer' | 'Representative' | 'Sale of Data' | 'Destination Or Access' | 'Processor' | 'Related' | 'Controller' | 'Collection' | 'Storage Or Processing' | 'Recipient Of Sale' | 'SubProcessor' | 'Product Or Service Provider' | 'Joint Controller' | 'DirectParentChild', required: Relationship type name
  - `attributes` object: Custom And Base Attributes

## Response `201`

Relationship successfully created

- string, uuid: UUID of the created relationship

## 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.dev/onetrust/apis/platform-inventory.md) - [All operations](https://skmtc.dev/onetrust/apis/platform-inventory/llms.txt) - [OpenAPI document](https://skmtc.dev/onetrust/apis/platform-inventory/revisions/38c768b2c760?raw)
