---
title: "Create Relationship Type between Objects"
method: POST
path: "/v1/entity-link-types"
tags: ["Object Relationship Type Management"]
---

# Create Relationship Type between Objects

`POST /v1/entity-link-types`

## Request

- Base URL: `https://hostname/api/custom-entity`
- URL: `https://hostname/api/custom-entity/v1/entity-link-types`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://{hostname}/api/access/v1/oauth/token` scopes: `OBJECT_MANAGER`, `OBJECT_MANAGER_WRITE`, `INTEGRATION`

Use this API to create a new Relationship Type between two object types.

> 🗒 Things to Know
> 
> - This API only supports objects created via Object Manager, including Projects, Models, and Datasets.

## Request body

- CustomLinkTypeCreateRequest
  - `name` string, required: The name of the relationship type.
  - `description` string: The description of the relationship type.
  - `linkAssociations` LinkTypeAssociationRequest[], required: The details of linked relationships.
    - `entityType1` BasicEntityTypeInformation, required
      - `id` string, uuid, required: The unique identifier of the object type.
      - `name` string, required: The name of the object type.
      - `seeded` boolean: This flag indicates whether the object type is seeded.
      - `moduleName` 'Vendor' | 'DataMapping' | 'Risk' | 'Assessments' | 'CustomEntityManagement': The name of the product where the object type exists.
      - `schemaName` 'vendor' | 'data-mapping' | 'risk' | 'assessments' | 'customEntityManagement': The name of the schema.
    - `entityType2` BasicEntityTypeInformation, required
      - `id` string, uuid, required: The unique identifier of the object type.
      - `name` string, required: The name of the object type.
      - `seeded` boolean: This flag indicates whether the object type is seeded.
      - `moduleName` 'Vendor' | 'DataMapping' | 'Risk' | 'Assessments' | 'CustomEntityManagement': The name of the product where the object type exists.
      - `schemaName` 'vendor' | 'data-mapping' | 'risk' | 'assessments' | 'customEntityManagement': The name of the schema.
    - `entityTypePairKey` string: The pair key of the linked object types.
  - `entityType1ToEntityType2EntityLinkName` string: The name of the source object type's relationship to the target object type.
  - `entityType2ToEntityType1EntityLinkName` string: The name of the target object type's relationship to the source object type.

## Response `201`

Created - The relationship type has been successfully created

- LinkTypeDetailedInformation
  - `id` string, uuid, required: The unique identifier of the relationship type.
  - `name` string, required: The name of the relationship type.
  - `nameKey` string: The name key of the relationship type used for translation purposes.
  - `seeded` boolean: This flag indicates whether the relationship type is seeded.
  - `moduleName` string: The name of the product where the relationship type exists.
  - `description` string: The description of the relationship type.
  - `descriptionKey` string: The description key of the relationship type used for translation purposes.
  - `entityType1ToEntityType2EntityLinkName` string: The name of the source object type's relationship to the target object type.
  - `entityType1ToEntityType2EntityLinkNameKey` string: The name key of the source object type's relationship to the target object type used for translation purposes.
  - `entityType2ToEntityType1EntityLinkName` string: The name of the target object type's relationship to the source object type.
  - `entityType2ToEntityType1EntityLinkNameKey` string: The name key of the target object types's relationship to the source object type.
  - `enableAudit` boolean: This flag indicates whether audit activity is enabled.
  - `allowNewCustomLinkAssociation` boolean: This flag indicates whether new relationship links are allowed.
  - `auditFields` EntityRecordAuditInformation
    - `createdDate` string, date-time, required: The date and time that the record was created.
    - `lastUpdatedDate` string, date-time: The date and time that the record was last updated.
    - `createdBy` EntityBasicUserInformation
      - `id` string, uuid: The unique identifier of the user who last modified the record.
      - `name` string: The name of the user who last modified the record.
      - `email` string: The email address of the user who last modified the record.
      - `initials` string: The initials of the user who last modified the record.
    - `lastModifiedBy` EntityBasicUserInformation
      - `id` string, uuid: The unique identifier of the user who last modified the record.
      - `name` string: The name of the user who last modified the record.
      - `email` string: The email address of the user who last modified the record.
      - `initials` string: The initials of the user who last modified the record.
  - `linkAssociations` LinkTypeAssociationInformation[], required: The details of linked relationships.
    - `id` integer, required: The unique identifier of the relationship type.
    - `entityType1` BasicEntityTypeInformation, required
      - `id` string, uuid, required: The unique identifier of the object type.
      - `name` string, required: The name of the object type.
      - `seeded` boolean: This flag indicates whether the object type is seeded.
      - `moduleName` 'Vendor' | 'DataMapping' | 'Risk' | 'Assessments' | 'CustomEntityManagement': The name of the product where the object type exists.
      - `schemaName` 'vendor' | 'data-mapping' | 'risk' | 'assessments' | 'customEntityManagement': The name of the schema.
    - `entityType2` BasicEntityTypeInformation, required
      - `id` string, uuid, required: The unique identifier of the object type.
      - `name` string, required: The name of the object type.
      - `seeded` boolean: This flag indicates whether the object type is seeded.
      - `moduleName` 'Vendor' | 'DataMapping' | 'Risk' | 'Assessments' | 'CustomEntityManagement': The name of the product where the object type exists.
      - `schemaName` 'vendor' | 'data-mapping' | 'risk' | 'assessments' | 'customEntityManagement': The name of the schema.
    - `enabled` boolean, required: This flag indicates whether relationship links are enabled.
    - `seeded` boolean, required: This flag indicates whether the relationship type is seeded.
    - `auditFields` EntityRecordAuditInformation
      - `createdDate` string, date-time, required: The date and time that the record was created.
      - `lastUpdatedDate` string, date-time: The date and time that the record was last updated.
      - `createdBy` EntityBasicUserInformation
        - `id` string, uuid: The unique identifier of the user who last modified the record.
        - `name` string: The name of the user who last modified the record.
        - `email` string: The email address of the user who last modified the record.
        - `initials` string: The initials of the user who last modified the record.
      - `lastModifiedBy` EntityBasicUserInformation
        - `id` string, uuid: The unique identifier of the user who last modified the record.
        - `name` string: The name of the user who last modified the record.
        - `email` string: The email address of the user who last modified the record.
        - `initials` string: The initials of the user who last modified the record.

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