---
updatedAt: 2026-05-27T12:52:31.000Z
agentTools:
  projectIndex: https://developer.onetrust.com/onetrust/llms.txt
---

# Link or Unlink Personal Data to Relationship by Type Name

Use this API to link or Unlink the personal data to a relationship.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Platform - Inventory",
    "version": "1.0",
    "contact": {
      "name": "OneTrust Support",
      "url": "https://my.onetrust.com/s/contactsupport"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    },
    "description": "The Inventory APIs are used to manage relationships and link data within the inventory."
  },
  "servers": [
    {
      "url": "https://{hostname}",
      "variables": {
        "hostname": {
          "default": "hostname",
          "description": "The OneTrust hostname such as app.onetrust.com, app-eu.onetrust.com, app-de.onetrust.com, app-uk.onetrust.com, app-apac.onetrust.com, trial.onetrust.com, or uat.onetrust.com."
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Inventory Relationships V2",
      "description": "The Inventory Relationships V2 APIs are used to manage V2 inventory relationships.",
      "externalDocs": {
        "description": "OpenAPI 3.1.0 - Download Definition",
        "url": "https://developer.onetrust.com/onetrust/openapi/platform-inventory.json"
      }
    }
  ],
  "x-onetrust": {
    "spec-label": "OpenAPI 3.1.0"
  },
  "x-readme": {
    "explorer-enabled": false,
    "proxy-enabled": false,
    "metrics-enabled": false
  },
  "paths": {
    "/api/inventory-linking/v1/contextual-entities/{contextualLinkId}/contextual-entity-types/names/{entityTypeName}/data-elements": {
      "put": {
        "operationId": "linkOrUnlinkInventoryRelationshipsUsingRelationshipUsingPUT_1",
        "summary": "Link or Unlink Personal Data to Relationship by Type Name",
        "description": "Use this API to link or Unlink the personal data to a relationship.",
        "tags": [
          "Inventory Relationships V2"
        ],
        "x-onetrust": {
          "spec-label": "https://developer.onetrust.com/onetrust/openapi/platform-inventory.json"
        },
        "parameters": [
          {
            "name": "entityTypeName",
            "in": "path",
            "description": "Entity type name",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 50,
              "minLength": 1
            },
            "example": "vendors"
          },
          {
            "name": "contextualLinkId",
            "in": "path",
            "description": "Contextual Link Identifier",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "4C09BF9A-38AA-45A9-87BA-77596525849E"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PersonalDataLinkRequest"
                }
              },
              "example": [
                {
                  "dataElementId": "f2229953-b4b5-4042-8cb9-b78038cc4c46",
                  "dataSubjectTypeId": "a1b2c3d4-e5f6-4042-8cb9-b78038cc4c46"
                }
              ]
            }
          }
        },
        "responses": {
          "201": {
            "description": "Personal data elements successfully linked or unlinked"
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests. \nFor more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).",
            "headers": {
              "Retry-After": {
                "schema": {
                  "description": "The number of seconds after which requests will be allowed again.",
                  "format": "int32"
                }
              },
              "ot-period": {
                "schema": {
                  "description": "The unit of time for which the rate limit applies",
                  "enum": [
                    "HOUR",
                    "MINUTE"
                  ]
                }
              },
              "ot-ratelimit-event-id": {
                "schema": {
                  "description": "The unique identifier for the rate-limiting event.",
                  "format": "uuid"
                }
              },
              "ot-request-made": {
                "schema": {
                  "description": "The number of requests made within the specified period.",
                  "format": "int32"
                }
              },
              "ot-requests-allowed": {
                "schema": {
                  "description": "The number of requests allowed within the specified period.",
                  "format": "int32"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "OAUTH2": [
              "INVENTORY",
              "INVENTORY_WRITE"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "PersonalDataLinkRequest": {
        "type": "object",
        "properties": {
          "dataElementId": {
            "description": "ID of the data element to link/unlink",
            "type": "string",
            "format": "uuid",
            "example": "f2229953-b4b5-4042-8cb9-b78038cc4c46"
          },
          "dataSubjectTypeId": {
            "description": "ID of the data subject type to link/unlink",
            "type": "string",
            "format": "uuid",
            "example": "a1b2c3d4-e5f6-4042-8cb9-b78038cc4c46"
          }
        },
        "example": {
          "dataElementId": "f2229953-b4b5-4042-8cb9-b78038cc4c46",
          "dataSubjectTypeId": "a1b2c3d4-e5f6-4042-8cb9-b78038cc4c46"
        }
      }
    },
    "securitySchemes": {
      "OAUTH2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://{hostname}/api/access/v1/oauth/token",
            "scopes": {
              "INVENTORY": "Inventory scope for external systems"
            }
          }
        }
      }
    }
  }
}
```

# Sibling pages

* [Get List of Relationships](https://developer.onetrust.com/onetrust/reference/listallinventoryrelationshipsusingpost.md)
* [Update Relationship by Type Name](https://developer.onetrust.com/onetrust/reference/updateinventoryrelationsusingentitytypename_1.md)
* [Get Personal Data for Relationship by Type Name](https://developer.onetrust.com/onetrust/reference/getpersonaldataforrelationshipsusingpost_1.md)
* [Update Relationship by Type ID](https://developer.onetrust.com/onetrust/reference/updateinventoryrelationsusingentitytypename.md)
* [Link or Unlink Personal Data to Relationship by Type ID](https://developer.onetrust.com/onetrust/reference/linkorunlinkinventoryrelationshipsusingrelationshipusingput.md)
* [Get Personal Data for Relationship by Type ID](https://developer.onetrust.com/onetrust/reference/getpersonaldataforrelationshipsusingpost.md)
* [Create Relationship](https://developer.onetrust.com/onetrust/reference/createinventoryrelationsusingpost.md)
* [Get Relationship by Type Name](https://developer.onetrust.com/onetrust/reference/getinventoryrelationshipusingrelationshiptypename_1.md)
* [Delete Relationship by Type Name](https://developer.onetrust.com/onetrust/reference/deleteinventoryrelationsusingrelationshiptypename_1.md)
* [Get Relationship by Type ID](https://developer.onetrust.com/onetrust/reference/getinventoryrelationshipusingrelationshiptypename.md)
* [Delete Relationship by Type ID](https://developer.onetrust.com/onetrust/reference/deleteinventoryrelationsusingrelationshiptypename.md)