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

# Demote deployment

> Move a deployment from production to staging status.



## OpenAPI

````yaml put /v1/flow/deployments/{deployment_id}/demote
openapi: 3.1.0
info:
  title: SeekrFlow API
  description: SeekrFlow API Documentation
  termsOfService: http://www.seekr.com/support
  contact:
    name: Seekr API Support
    url: http://www.seekr.com/contact
    email: contact@seekr.com
  version: 5.87.1
servers:
  - url: https://flow.seekr.com
    description: SeekrBuild server base URL
security: []
paths:
  /v1/flow/deployments/{deployment_id}/demote:
    put:
      tags:
        - Deployments
      summary: Demote deployment
      description: Move a deployment from production to staging status.
      operationId: demote_v1_flow_deployments__deployment_id__demote_put
      parameters:
        - name: deployment_id
          in: path
          required: true
          schema:
            type: string
            title: Deployment Id
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deployment'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    Deployment:
      properties:
        id:
          type: string
          title: Id
        model_type:
          $ref: '#/components/schemas/DeploymentType'
        model_id:
          type: string
          title: Model Id
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        status:
          $ref: '#/components/schemas/DeploymentStatus'
        memory:
          anyOf:
            - type: string
            - type: 'null'
          title: Memory
        hardware_type:
          $ref: '#/components/schemas/HardwareType'
          default: Dedicated
        total_input_tokens:
          type: integer
          title: Total Input Tokens
        total_output_tokens:
          type: integer
          title: Total Output Tokens
        created_at:
          type: string
          format: date-time
          title: Created At
        last_deployed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Deployed At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        processor:
          $ref: '#/components/schemas/DeploymentProcessor'
          default: GAUDI2
        n_instances:
          type: integer
          title: N Instances
        user_id:
          type: string
          title: User Id
        team_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Team Id
        model_name:
          type: string
          title: Model Name
        n_epochs:
          anyOf:
            - type: integer
            - type: 'null'
          title: N Epochs
        batch_size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Batch Size
        learning_rate:
          anyOf:
            - type: number
            - type: 'null'
          title: Learning Rate
        training_files:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Training Files
        project_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Project Id
        project_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Name
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
        finetune_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Finetune Name
        finetune_created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Finetune Created At
        active_duration:
          type: integer
          minimum: 0
          title: Active Duration
          default: 0
        is_lora_adapter:
          type: boolean
          title: Is Lora Adapter
          default: false
      type: object
      required:
        - id
        - model_type
        - model_id
        - name
        - description
        - status
        - total_input_tokens
        - total_output_tokens
        - created_at
        - updated_at
        - n_instances
        - user_id
        - team_id
        - model_name
      title: Deployment
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DeploymentType:
      type: string
      enum:
        - Fine-tuned Run
        - Base Model
      title: DeploymentType
    DeploymentStatus:
      type: string
      enum:
        - Inactive
        - Pending
        - Active
        - Failed
        - Started
        - Success
      title: DeploymentStatus
    HardwareType:
      type: string
      enum:
        - Serverless
        - Dedicated
      title: HardwareType
    DeploymentProcessor:
      type: string
      enum:
        - GAUDI2
        - GAUDI3
        - A100
        - A10
        - AMD
        - H100
        - MI300X
      title: DeploymentProcessor
    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
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: Seekr API Key without 'Bearer' Prefix
      in: header
      name: Authorization

````