---
title: "Create a new LinkType in the datamodel"
method: POST
path: "/link-types"
tags: ["Data Model"]
---

# Create a new LinkType in the datamodel

`POST /link-types`

Creates a LinkType resource.

## Request body

- LinkTypeLinkTypeInputLinkTypeInputCreate
  - `id` string
  - `name` LanguageTranslation — This structure does accept key & values where key has to be a language code configured in your PIM & the value is the value for this field in this language.
    - `fr-FR` string
    - `en-US` string
  - `priority` integer — This defines the priority of the link.
  - `maxItems` integer, nullable — This defines the maximum number of items that will be accepted while creating links. If null, an infinite number of items will be accepted.
  - `origin` LinkTypeOriginRelationInputLinkTypeInputCreate
    - `objectType` 'document', nullable — This defines the linked object type
    - `documentType` LinkTypeRelationDocumentTypeInputLinkTypeInputCreate
      - `id` string, nullable
  - `target` LinkTypeTargetRelationInputLinkTypeInputCreate
    - `objectType` 'asset' | 'document', nullable — This defines the linked object type
    - `documentType` LinkTypeRelationDocumentTypeInputLinkTypeInputCreate
      - `id` string, nullable

## Response `201`

LinkType resource created

- LinkTypeLinkTypeOutputLinkTypeOutput
  - `legacyId` integer
  - `name` LanguageTranslation — This structure does accept key & values where key has to be a language code configured in your PIM & the value is the value for this field in this language.
    - `fr-FR` string
    - `en-US` string
  - `priority` integer — This defines the priority of the link.
  - `maxItems` integer, nullable — This defines the maximum number of items that will be accepted while creating links. If null, an infinite number of items will be accepted.
  - `origin` LinkTypeOriginRelationOutputLinkTypeOutput
    - `objectType` 'document' — This defines the linked object type
    - `documentType` DocumentTypeLinkTypeOutput
      - `id` string, required — This is the unique identifier of the resource
  - `target` LinkTypeTargetRelationOutputLinkTypeOutput
    - `objectType` 'asset' | 'document' — This defines the linked object type
    - `documentType` DocumentTypeLinkTypeOutput
      - `id` string, required — This is the unique identifier of the resource
  - `status` string
  - `dateCreated` string, date-time, nullable — This is an ISO datetime
  - `dateModified` string, date-time, nullable — This is an ISO datetime
  - `maxCountLinksByOrigin` integer
  - `id` string — This is the unique identifier of the resource

## Other responses

- `400` — Invalid input
- `422` — Unprocessable entity

---

[API](https://skmtc.net/quable/apis/quable-pim-api-documentation-v5.md) · [All operations](https://skmtc.net/quable/apis/quable-pim-api-documentation-v5/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/quable/quable-pim-api-documentation-v5/versions/1641096abb34/schema)
