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

# Get organization pipeline

> Return a single pipeline for the org — defaults to the default pipeline of the given `type`, or the pipeline identified by `pipelineId`. The response includes stages and `pipelineStageIds` for the canvas renderer.



## OpenAPI

````yaml /api-reference/openapi.yaml get /api/pipelines
openapi: 3.0.3
info:
  title: Tether Relay and Tether API
  version: 1.0.0
  description: >-
    Route-derived OpenAPI contract generated from tether-relay backend sources.
    Regenerate with scripts/sync-openapi-from-backend.mjs.
servers:
  - url: https://your-instance.example.com
    description: Production
  - url: http://localhost:2212
    description: Local API service
security: []
tags:
  - name: AI
  - name: Applications
  - name: Approval
  - name: Auth
  - name: Automations
  - name: Calls
  - name: Campaigns
  - name: Contact Analytics
  - name: Contact Metrics
  - name: Contact Notes
  - name: Contacts
  - name: Conversation Monitor
  - name: Conversations
  - name: Departments
  - name: Email
  - name: Escalation Dashboard
  - name: Event Logs
  - name: Google Sheets
  - name: Marketplace
  - name: Messages
  - name: Notification Sounds
  - name: Notifications
  - name: Org Snapshots
  - name: Organizations
  - name: Outreach
  - name: Outreach Metrics
  - name: Outreach Sources
  - name: Pipelines
  - name: Processes
  - name: Prompts
  - name: Reminders
  - name: Sms
  - name: Templates
  - name: Traces
  - name: Training
  - name: Upload
  - name: User Snapshots
  - name: Users
  - name: Vertical
  - name: Webchats
  - name: Webhook
paths:
  /api/pipelines:
    get:
      tags:
        - Pipelines
      summary: Get organization pipeline
      description: >-
        Return a single pipeline for the org — defaults to the default pipeline
        of the given `type`, or the pipeline identified by `pipelineId`. The
        response includes stages and `pipelineStageIds` for the canvas renderer.
      operationId: get_pipelines
      parameters:
        - in: query
          name: type
          required: false
          schema:
            type: string
            enum:
              - Contact
              - Application
            default: Contact
        - in: query
          name: pipelineId
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Pipeline returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PipelineResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PipelineErrorResponse'
        '404':
          description: Pipeline not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PipelineErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PipelineErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    PipelineResponse:
      type: object
      properties:
        pipeline:
          $ref: '#/components/schemas/PipelineDto'
      additionalProperties: true
      example:
        pipeline:
          _id: 66f0a0b0c0d0e0f0a0b0c0d0
          name: Sales pipeline
          type: Contact
          isDefault: true
          pipelineStages:
            - _id: 67f0a0b0c0d0e0f0a0b0c0d0
              name: New
              color: '#3B82F6'
              position: 0
            - _id: 67f0a0b0c0d0e0f0a0b0c0d1
              name: Qualified
              color: '#10B981'
              position: 1
    PipelineErrorResponse:
      type: object
      properties:
        error:
          type: string
      additionalProperties: true
      example:
        error: Pipeline not found
    PipelineDto:
      type: object
      properties:
        _id:
          type: string
        name:
          type: string
        description:
          type: string
        organizationId:
          type: string
        type:
          type: string
          enum:
            - Contact
            - Application
        isDefault:
          type: boolean
        isActive:
          type: boolean
        stages:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              color:
                type: string
            additionalProperties: true
        pipelineStageIds:
          type: array
          items:
            type: string
        pipelineStages:
          type: array
          items:
            $ref: '#/components/schemas/PipelineStageItem'
        createdBy:
          type: string
          description: User ID or populated user object
        updatedBy:
          type: string
          description: User ID or populated user object
      additionalProperties: true
      example:
        _id: 66f0a0b0c0d0e0f0a0b0c0d0
        name: Sales pipeline
        description: NA sales pipeline
        organizationId: 65a0e0e0e0e0e0e0e0e0e0e0
        type: Contact
        isDefault: true
        isActive: true
        stages:
          - name: New
            color: '#3B82F6'
          - name: Qualified
            color: '#10B981'
        pipelineStageIds:
          - 67f0a0b0c0d0e0f0a0b0c0d0
          - 67f0a0b0c0d0e0f0a0b0c0d1
        pipelineStages:
          - _id: 67f0a0b0c0d0e0f0a0b0c0d0
            name: New
            color: '#3B82F6'
            position: 0
          - _id: 67f0a0b0c0d0e0f0a0b0c0d1
            name: Qualified
            color: '#10B981'
            position: 1
        createdBy: 65b1f0a2c3d4e5f6a7b8c9d0
        updatedBy: 65b1f0a2c3d4e5f6a7b8c9d0
    PipelineStageItem:
      type: object
      properties:
        _id:
          type: string
          description: >-
            Existing stage id; include to update/rename a stage, omit to create
            a new one.
        name:
          type: string
          description: Stage display name; must be unique within the pipeline.
        color:
          type: string
          description: Hex color used to render the stage chip in the pipeline UI.
        position:
          type: number
          description: >-
            Zero-based sort order within the pipeline; defaults to array index
            when omitted.
      additionalProperties: true
      example:
        _id: 67f0a0b0c0d0e0f0a0b0c0d0
        name: Qualified
        color: '#10B981'
        position: 1
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````