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

# Create a pipeline version

> Create a new pipeline version with a schema



## OpenAPI

````yaml /swagger.yml post /public/pipelines/{pipelineId}/versions
openapi: 3.0.0
info:
  title: Public API Docs
  description: Clerk Public API
  version: '1.0'
  contact: {}
servers:
  - url: https://web-api.clerk.chat
    description: Production server
  - url: http://localhost:3000
    description: Production server
security: []
tags: []
paths:
  /public/pipelines/{pipelineId}/versions:
    post:
      tags:
        - Pipelines
      summary: Create a pipeline version
      description: Create a new pipeline version with a schema
      operationId: PublicPipelinesController_createVersion
      parameters:
        - name: pipelineId
          in: path
          required: true
          description: The ID of the pipeline
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePipelineVersionRequest'
      responses:
        '201':
          description: The created pipeline version
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PipelineVersionObject'
        '400':
          description: Invalid request body
        '401':
          description: Unauthorized request
        '403':
          description: You do not have permission to access this resource
        '404':
          description: Resource not found
        '422':
          description: Invalid request parameters
        '429':
          description: Too many requests for this resource
        '500':
          description: Internal server error
      security:
        - api_key: []
components:
  schemas:
    CreatePipelineVersionRequest:
      type: object
      required:
        - schema
      properties:
        schema:
          type: object
          description: The pipeline schema definition
        versionName:
          type: string
          description: An optional name for the version
          example: My New Version
        parentVersionId:
          type: string
          format: uuid
          description: The ID of the parent version to branch from
          example: 00000000-0000-0000-0000-000000000000
        newBranch:
          type: boolean
          description: Whether to create the version as a new branch
          example: false
    PipelineVersionObject:
      type: object
      description: Represents a pipeline version resource
      required:
        - id
        - number
        - pipelineId
        - schema
        - isLatestLive
      properties:
        id:
          type: string
          format: uuid
          description: The ID of the pipeline version
          example: 00000000-0000-0000-0000-000000000000
        number:
          type: number
          description: The version number
          example: 1
        name:
          type: string
          description: The name of the pipeline version
          example: My Version
          nullable: true
        pipelineId:
          type: string
          format: uuid
          description: The ID of the parent pipeline
          example: 00000000-0000-0000-0000-000000000000
        pipelineOptions:
          type: object
          description: Pipeline configuration options
        versionId:
          type: string
          format: uuid
          description: The ID of the pipeline version (alias for id)
          example: 00000000-0000-0000-0000-000000000000
        versionNumber:
          type: number
          description: The version number (alias for number)
          example: 1
        versionName:
          type: string
          description: The name of the pipeline version (alias for name)
          example: My Version
          nullable: true
        schema:
          type: object
          description: The pipeline schema definition
        madeLiveAt:
          type: string
          format: date-time
          description: When this version was made live
          example: '2021-01-01T00:00:00.000Z'
          nullable: true
        isLatestLive:
          type: boolean
          description: Whether this is the latest live version
          example: true
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: apiKey

````