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

# Reorder Questions

> Reorder all questions in a form. Must include all question IDs.



## OpenAPI

````yaml openapi.json patch /forms/{id}/fields/reorder
openapi: 3.1.0
info:
  title: GeniusForms API
  description: >-
    AI-powered form builder API. Create forms manually or generate them from
    natural language prompts.
  version: 1.0.0
  contact:
    name: GeniusForms Support
    email: support@geniusforms.ai
    url: https://geniusforms.ai
servers:
  - url: https://geniusforms.ai/api/v1
    description: Production
  - url: http://localhost:8000/api/v1
    description: Local Development
security:
  - ApiKeyAuth: []
paths:
  /forms/{id}/fields/reorder:
    patch:
      tags:
        - Questions
      summary: Reorder Questions
      description: Reorder all questions in a form. Must include all question IDs.
      operationId: reorderQuestions
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReorderQuestionsRequest'
      responses:
        '200':
          description: Questions reordered
          content:
            application/json:
              schema:
                type: object
                properties:
                  fields:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        order:
                          type: integer
components:
  schemas:
    ReorderQuestionsRequest:
      type: object
      required:
        - fieldIds
      properties:
        fieldIds:
          type: array
          items:
            type: integer
          description: All question IDs in the desired order
          example:
            - 3
            - 1
            - 2
            - 4
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key obtained from your GeniusForms dashboard

````