> ## 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.

# Reassign records from one pipeline stage to another

> Moves all contacts or applications from sourceStageId to targetStageId (must belong to the same pipeline) and deactivates the source stage. The body requires both stage ids.



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/pipelines/stages/reassign
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/stages/reassign:
    post:
      tags:
        - Pipelines
      summary: Reassign records from one pipeline stage to another
      description: >-
        Moves all contacts or applications from sourceStageId to targetStageId
        (must belong to the same pipeline) and deactivates the source stage. The
        body requires both stage ids.
      operationId: post_pipelines_stages_reassign
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReassignPipelineStageRequest'
      responses:
        '200':
          description: Stage records reassigned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReassignPipelineStageResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PipelineErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PipelineErrorResponse'
        '404':
          description: Source or target stage 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:
    ReassignPipelineStageRequest:
      type: object
      properties:
        sourceStageId:
          type: string
          description: >-
            Stage being retired — its contacts/applications are moved to
            `targetStageId` and the stage is deactivated.
        targetStageId:
          type: string
          description: >-
            Destination stage that receives the source stage's records; must
            belong to the same pipeline and be active.
      required:
        - sourceStageId
        - targetStageId
      additionalProperties: true
      example:
        sourceStageId: 67f0a0b0c0d0e0f0a0b0c0d0
        targetStageId: 67f0a0b0c0d0e0f0a0b0c0d1
    ReassignPipelineStageResponse:
      type: object
      properties:
        success:
          type: boolean
        recordsTransferred:
          type: number
        sourceStage:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
          additionalProperties: true
        targetStage:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
          additionalProperties: true
      additionalProperties: true
      example:
        success: true
        recordsTransferred: 7
        sourceStage:
          id: 67f0a0b0c0d0e0f0a0b0c0d0
          name: New
        targetStage:
          id: 67f0a0b0c0d0e0f0a0b0c0d1
          name: Qualified
    PipelineErrorResponse:
      type: object
      properties:
        error:
          type: string
      additionalProperties: true
      example:
        error: Pipeline not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````