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

# Reorder the steps of a proposed AI plan (bearer token)



## OpenAPI

````yaml https://platform.ankra.app/openapi.json post /api/v1/chat/plans/{plan_id}/reorder
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://platform.ankra.app
security: []
paths:
  /api/v1/chat/plans/{plan_id}/reorder:
    post:
      tags:
        - chat
      summary: Reorder the steps of a proposed AI plan (bearer token)
      operationId: reorder_plan_steps_endpoint_api_v1_chat_plans__plan_id__reorder_post
      parameters:
        - in: path
          name: plan_id
          required: true
          schema:
            format: uuid
            title: Plan Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                entries:
                  items:
                    properties:
                      step_id:
                        format: uuid
                        title: Step Id
                        type: string
                      step_order:
                        title: Step Order
                        type: integer
                    required:
                      - step_id
                      - step_order
                    type: object
                  minItems: 1
                  title: Entries
                  type: array
              required:
                - entries
              title: ReorderPlanStepsRequest
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: The updated plan document
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Entry shape, completeness, or step state refused
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Bearer token missing (400) or invalid (401)
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    ContractDetailError:
      example:
        detail: Cluster not found
      properties:
        detail:
          oneOf:
            - type: string
            - additionalProperties: true
              properties: {}
              type: object
      required:
        - detail
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````