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

# Update Relationship by Type ID

Use this API to modify a contextual link between two entities.

# 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/{entityTypeId}": {
      "put": {
        "operationId": "updateInventoryRelationsUsingEntityTypeName",
        "summary": "Update Relationship by Type ID",
        "description": "Use this API to modify a contextual link between two entities.",
        "tags": [
          "Inventory Relationships V2"
        ],
        "x-onetrust": {
          "spec-label": "https://developer.onetrust.com/onetrust/openapi/platform-inventory.json"
        },
        "parameters": [
          {
            "name": "entityTypeId",
            "in": "path",
            "description": "Entity type identifier",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "2aa71ead-0c9a-416a-8471-bdfb67c8d113"
          },
          {
            "name": "contextualLinkId",
            "in": "path",
            "description": "Contextual Link Identifier to be updated",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "4C09BF9A-38AA-45A9-87BA-77596525849E"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContextualLinkUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Relationship successfully updated"
          },
          "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": {
      "AssociatedAttributeValueInformation": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Unique identifier for the attribute option",
            "type": "string",
            "format": "uuid",
            "example": "a34ccec7-1ec0-4d65-9075-bdd0d923f1d1"
          },
          "value": {
            "description": "Attribute value",
            "type": "string",
            "example": "Text Value"
          },
          "valueKey": {
            "description": "Translation key used for localizing the value",
            "type": "string",
            "example": "attribute.option.valueKey"
          },
          "colorCode": {
            "description": "Color code associated with the option. Used for score-based attributes.",
            "type": "string",
            "example": "red"
          }
        },
        "required": [
          "value"
        ]
      },
      "AttributeValueInformation": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Unique identifier for the attribute option",
            "type": "string",
            "format": "uuid",
            "example": "a34ccec7-1ec0-4d65-9075-bdd0d923f1d1"
          },
          "value": {
            "description": "Attribute value",
            "type": "string",
            "example": "Text Value"
          },
          "valueKey": {
            "description": "Translation key used for localizing the value",
            "type": "string",
            "example": "attribute.option.valueKey"
          },
          "colorCode": {
            "description": "Color code associated with the option. Used for score-based attributes.",
            "type": "string",
            "example": "red"
          },
          "optionSelectionValue": {
            "description": "Selection score value linked to the option. Used for score-based or numerical-based attributes.",
            "type": "string",
            "example": "3.5"
          },
          "displayLabel": {
            "description": "Display name for the option, used for external attributes managed by other systems",
            "type": "string",
            "example": "United State | San Francisco"
          },
          "associatedAttributeValueInformation": {
            "description": "Associated attribute option information",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AssociatedAttributeValueInformation"
            }
          },
          "disabled": {
            "description": "Indicates whether this attribute option is currently disabled.",
            "type": "boolean",
            "example": false,
            "default": "false"
          }
        },
        "required": [
          "value"
        ]
      },
      "ContextualLinkUpdateRequest": {
        "type": "object",
        "properties": {
          "processingActivityId": {
            "description": "Processing Activity Id",
            "type": "string",
            "format": "uuid",
            "example": "f2229953-b4b5-4042-8cb9-b78038cc4c46"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/AttributeValueInformation"
              }
            },
            "writeOnly": true
          }
        }
      }
    },
    "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)
* [Link or Unlink Personal Data to Relationship by Type Name](https://developer.onetrust.com/onetrust/reference/linkorunlinkinventoryrelationshipsusingrelationshipusingput_1.md)
* [Get Personal Data for Relationship by Type Name](https://developer.onetrust.com/onetrust/reference/getpersonaldataforrelationshipsusingpost_1.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)