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

# Create a new pipeline

> Creates a new pipeline definition with its associated steps.
This endpoint defines the sequence of jobs but does not start execution immediately.
Use the 'start' endpoint to begin the pipeline execution.



## OpenAPI

````yaml https://api.ionworks.com/openapi.json post /pipelines
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.ionworks.com
    description: Production
security: []
paths:
  /pipelines:
    post:
      tags:
        - Pipeline
      summary: Create a new pipeline
      description: >-
        Creates a new pipeline definition with its associated steps.

        This endpoint defines the sequence of jobs but does not start execution
        immediately.

        Use the 'start' endpoint to begin the pipeline execution.
      operationId: create_pipeline_pipelines_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PipelineConfig'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PipelineDetail'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PipelineConfig:
      properties:
        project_id:
          type: string
          title: Project Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        options:
          $ref: '#/components/schemas/PipelineOptions'
        elements:
          additionalProperties: true
          type: object
          title: Elements
      type: object
      required:
        - project_id
        - elements
      title: PipelineConfig
    PipelineDetail:
      properties:
        id:
          type: string
          title: Id
        project_id:
          type: string
          title: Project Id
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        options:
          $ref: '#/components/schemas/PipelineOptions'
        status:
          $ref: '#/components/schemas/PipelineStatus'
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        error_code:
          anyOf:
            - $ref: '#/components/schemas/JobErrorCode'
            - type: 'null'
        created_by_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By Email
        organization_id:
          type: string
          title: Organization Id
          description: Organization this pipeline belongs to.
        elements:
          items:
            $ref: '#/components/schemas/PipelineElement'
          type: array
          title: Elements
          default: []
      type: object
      required:
        - id
        - project_id
        - name
        - status
        - created_at
        - updated_at
        - organization_id
      title: PipelineDetail
      description: Model for representing a pipeline with its elements in detail responses.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PipelineOptions:
      properties:
        live_progress_updates:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Live Progress Updates
          description: >-
            If True, save checkpoint progress to database during job execution.
            If None, the worker picks a default based on job type.
      type: object
      title: PipelineOptions
      description: Options for pipeline execution behavior.
    PipelineStatus:
      type: string
      enum:
        - pending
        - running
        - completed
        - failed
        - canceled
      title: PipelineStatus
    JobErrorCode:
      type: string
      enum:
        - CONFIGURATION_ERROR
        - MODEL_ERROR
        - SOLVER_ERROR
        - EXECUTION_TIMEOUT
        - SUBMISSION_FAILED
        - INTERNAL_ERROR
      title: JobErrorCode
      description: Machine-readable error codes for jobs.
    PipelineElement:
      properties:
        id:
          type: string
          title: Id
        pipeline_id:
          type: string
          title: Pipeline Id
        name:
          type: string
          title: Name
        element_order:
          type: integer
          exclusiveMinimum: 0
          title: Element Order
          description: Order of execution within the pipeline (1-based)
        element_type:
          $ref: '#/components/schemas/ElementType'
          description: Type of job for this step
        job_config:
          additionalProperties: true
          type: object
          title: Job Config
          description: Configuration parameters for the job
        job_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Job Id
        result:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Result
        status:
          $ref: '#/components/schemas/PipelineElementStatus'
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        error_code:
          anyOf:
            - $ref: '#/components/schemas/JobErrorCode'
            - type: 'null'
        error_detail:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
        job_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Job Status
          description: Job status via job_id (from jobs.status).
        organization_id:
          type: string
          title: Organization Id
          description: Organization this pipeline element belongs to.
      type: object
      required:
        - id
        - pipeline_id
        - name
        - element_order
        - element_type
        - job_config
        - status
        - created_at
        - updated_at
        - organization_id
      title: PipelineElement
      description: Model for representing a pipeline element in API responses.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ElementType:
      type: string
      enum:
        - Direct Entry
        - Data Fit
        - Calculation
        - Validation
      title: ElementType
    PipelineElementStatus:
      type: string
      enum:
        - pending
        - running
        - completed
        - failed
        - skipped
        - canceled
      title: PipelineElementStatus

````