> ## Documentation Index
> Fetch the complete documentation index at: https://docs.serial.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Component Link

> Create a link between two components



## OpenAPI

````yaml PUT /components/links
openapi: 3.1.0
info:
  title: Serial
  version: '1.0'
  description: Access and control your Serial data programmatically.
  contact:
    name: Devon Copeland
    email: support@serial.io
    url: www.serial.io
  summary: Serial API
servers:
  - url: https://api.serial.io
security:
  - serial-default-security: []
tags:
  - name: AI
    description: AI Endpoints
  - name: Auth
    description: Auth Endpoints
  - name: Companies
    description: Company Endpoints
  - name: Component Instances
    description: Component Instance Endpoints
  - name: Components
    description: Component Endpoints
  - name: Datasets
    description: Dataset Endpoints
  - name: Fields
    description: Field Endpoints
  - name: Legacy
    description: Legacy Endpoints
  - name: Part Numbers
    description: Part Number Endpoints
  - name: Processes
    description: Process Endpoints
  - name: Properties
    description: Property Endpoints
  - name: Storage
    description: Storage Endpoints
  - name: Users
    description: User Endpoints
  - name: Work Orders
    description: Work Order Endpoints
paths:
  /components/links:
    put:
      tags:
        - Components
      summary: Create Component Link
      description: Create a link between two components
      operationId: put-components-links
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                parent_component_id:
                  type: string
                  x-stoplight:
                    id: 7jj9fxetjkhcq
                  format: uuid
                  description: Database id for parent component
                child_component_id:
                  type: string
                  x-stoplight:
                    id: 1m16yys6i6cco
                  format: uuid
                  description: Database id for child component
                process_id:
                  type: string
                  x-stoplight:
                    id: r2axmkoa5yf59
                  format: uuid
                  description: Database id for process where linking occurs.
                dataset_id:
                  type: string
                  x-stoplight:
                    id: jsn8xz549w8j4
                  format: uuid
                  description: Database id for dataset where linking occurs.
              required:
                - parent_component_id
                - child_component_id
                - process_id
                - dataset_id
        description: ''
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Component-link'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
components:
  schemas:
    Component-link:
      title: component-link
      x-stoplight:
        id: 2syq5t89nq63d
      type: object
      properties:
        id:
          type: string
          x-stoplight:
            id: 76s947k1mqvre
          format: uuid
          description: Database id for component link
        component_id:
          type: string
          x-stoplight:
            id: inlfptcrlhwv3
          format: uuid
          description: Database id of parent component
        has_child_of_id:
          type: string
          x-stoplight:
            id: b4vl9wjf7daj9
          format: uuid
          description: Database id for child component
        process_id:
          type: string
          x-stoplight:
            id: 2pza699zgwk7u
          format: uuid
          description: Database id for process where linking happens
        dataset_id:
          type: string
          x-stoplight:
            id: nstj7ul6nv0eg
          format: uuid
          description: Dataset id for linking.
  securitySchemes:
    serial-default-security:
      type: http
      scheme: bearer
      description: '**API Key** or **Token** formatted as `Bearer <YOUR_KEY_OR_TOKEN>`'

````