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

# Reorder stages in a pipeline

> Body: `[{"id": 1, "position": 2}, ...]`. Unknown stage IDs are ignored.



## OpenAPI

````yaml /openapi.json post /api/v1/ticket-pipelines/{pipeline_id}/stages/reorder/
openapi: 3.0.3
info:
  title: ChatBridge Public API
  version: 1.0.0
  description: >-
    Customer-facing REST API for ChatBridge — contacts, conversations, messages,
    templates, team, catalogue, tickets, and WhatsApp Flows. Authenticate with a
    workspace API key: `Authorization: Bearer cb_...`. See
    https://github.com/algosmiths/whatschat/blob/main/public_api.md for the full
    scope/versioning reference.
servers:
  - url: https://api.algosmiths.com
    description: Production
security: []
paths:
  /api/v1/ticket-pipelines/{pipeline_id}/stages/reorder/:
    post:
      tags:
        - Ticket Stages
      summary: Reorder stages in a pipeline
      description: 'Body: `[{"id": 1, "position": 2}, ...]`. Unknown stage IDs are ignored.'
      operationId: ticket_pipelines_stages_reorder_create
      parameters:
        - in: path
          name: pipeline_id
          schema:
            type: integer
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/TicketStageReorderRequestRequest'
          application/x-www-form-urlencoded:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/TicketStageReorderRequestRequest'
          multipart/form-data:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/TicketStageReorderRequestRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketStageReorderResponse'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: >-
            Forbidden — insufficient scope (requires ticket.manage),
            cross-workspace, or trial expired
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Rate limit exceeded
      security:
        - ApiKeyAuth: []
        - tokenAuth: []
        - CookieAuth: []
components:
  schemas:
    TicketStageReorderRequestRequest:
      type: object
      properties:
        id:
          type: integer
        position:
          type: integer
      required:
        - id
        - position
    TicketStageReorderResponse:
      type: object
      properties:
        status:
          type: string
      required:
        - status
    ValidationErrorResponse:
      type: object
      additionalProperties:
        type: array
        items:
          type: string
      description: >-
        Field-level validation error response (400). Keys are field names;
        values are lists of error messages. May include 'non_field_errors' for
        non-field-specific errors.
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: cb_...
      description: >-
        Workspace API key, e.g. `Authorization: Bearer cb_live_...`. Create one
        in Settings → API Keys. See public_api.md § 3 for scopes.
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"
    CookieAuth:
      type: apiKey
      in: cookie
      name: token
      description: Dashboard session cookie — internal use only, not the public contract.

````