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

# Add Component



## OpenAPI

````yaml /openapi.json post /v1/workspaces/{workspaceId}/collections/{collectionId}/entries/{entryId}/reference-items/{referenceItemId}/components/new
openapi: 3.1.0
info:
  title: Specurate API
  description: ''
  version: 1.0.0
  contact: {}
servers:
  - url: https://app.specurate.com/api
    description: API Server
security: []
tags: []
paths:
  /v1/workspaces/{workspaceId}/collections/{collectionId}/entries/{entryId}/reference-items/{referenceItemId}/components/new:
    post:
      tags:
        - Collection Reference Component
      summary: Add Component
      operationId: CollectionReferenceComponentController_addComponent_v1
      parameters:
        - name: workspaceId
          required: true
          in: path
          schema:
            type: string
            pattern: ^[1-9]\d*$
        - name: collectionId
          required: true
          in: path
          schema:
            type: string
            pattern: ^[1-9]\d*$
        - name: entryId
          required: true
          in: path
          schema:
            type: string
            pattern: ^[1-9]\d*$
        - name: referenceItemId
          required: true
          in: path
          schema:
            type: string
            pattern: ^[1-9]\d*$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddCollectionReferenceComponentDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CollectionReferenceItemComponentsMutationResponseDto
components:
  schemas:
    AddCollectionReferenceComponentDto:
      type: object
      properties:
        productTypeId:
          type: string
          pattern: ^[1-9]\d*$
        quantity:
          type: string
          pattern: ^(?!0+(?:\.0{1,6})?$)\d{1,16}(?:\.0{1,6})?$
        name:
          type: string
          minLength: 1
          maxLength: 200
        itemType:
          type: string
          enum:
            - default
            - material
        columnsAttributes:
          type: object
          propertyNames:
            type: string
            minLength: 1
            maxLength: 200
          additionalProperties:
            $ref: '#/components/schemas/__schema0'
        requestKey:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        collectionVersion:
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
        entryVersion:
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
        referenceItemVersion:
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
      required:
        - productTypeId
        - quantity
        - requestKey
        - collectionVersion
        - entryVersion
        - referenceItemVersion
      additionalProperties: false
    CollectionReferenceItemComponentsMutationResponseDto:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/CollectionReferenceItemComponentDto'
        addedCatalogItemIds:
          type: array
          items:
            type: string
        referenceItemVersion:
          type: number
        entryVersion:
          type: number
        collectionVersion:
          type: number
      required:
        - items
        - addedCatalogItemIds
        - referenceItemVersion
        - entryVersion
        - collectionVersion
    __schema0:
      anyOf:
        - type: string
        - type: number
        - type: boolean
        - type: 'null'
        - type: array
          items:
            $ref: '#/components/schemas/__schema0'
        - type: object
          propertyNames:
            type: string
          additionalProperties:
            $ref: '#/components/schemas/__schema0'
    CollectionReferenceItemComponentDto:
      type: object
      properties:
        id:
          type: string
        referenceItemId:
          type: string
        catalogItemId:
          type: string
        catalogItemType:
          type: object
        kind:
          enum:
            - material
            - part
          type: string
        catalogFamilySourceId:
          type:
            - string
            - 'null'
        name:
          type: string
        imageUrl:
          type:
            - string
            - 'null'
        referenceLabel:
          type:
            - string
            - 'null'
        manufacturerName:
          type:
            - string
            - 'null'
        sourceLabel:
          type:
            - string
            - 'null'
        quantity:
          type: string
        position:
          type:
            - number
            - 'null'
        version:
          type:
            - number
            - 'null'
      required:
        - id
        - referenceItemId
        - catalogItemId
        - catalogItemType
        - kind
        - catalogFamilySourceId
        - name
        - imageUrl
        - referenceLabel
        - manufacturerName
        - sourceLabel
        - quantity
        - position
        - version

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.