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

# Reorder report pages

> Set the display order of all pages within a report in a single atomic operation. Pass the complete ordered list of page UUIDs; pages are re-sorted to match this sequence exactly. All page UUIDs in the report must be present in the request — missing pages will cause a validation error.



## OpenAPI

````yaml https://api.surnex.io/openapi.json patch /v1/projects/{project_id}/reports/{report_id}/pages/reorder
openapi: 3.1.0
info:
  title: Surnex API
  description: |-
    Surnex SEO Platform API — api.surnex.io

    Provides the complete backend for the Surnex SEO dashboard including:
    - Multi-tenant organization management
    - Project tracking (domains)
    - Keyword rank tracking (Phase 1+)
    - Backlink analysis (Phase 3+)
    - Site auditing (Phase 4+)
    - Stripe billing integration
    - MCP endpoint for AI agents at /mcp
  version: 0.1.0
servers: []
security: []
paths:
  /v1/projects/{project_id}/reports/{report_id}/pages/reorder:
    patch:
      tags:
        - Reports
      summary: Reorder report pages
      description: >-
        Set the display order of all pages within a report in a single atomic
        operation. Pass the complete ordered list of page UUIDs; pages are
        re-sorted to match this sequence exactly. All page UUIDs in the report
        must be present in the request — missing pages will cause a validation
        error.
      operationId: >-
        reorder_pages_v1_projects__project_id__reports__report_id__pages_reorder_patch
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Project Id
        - name: report_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Report Id
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PageReorderRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIResponse_list_ReportPageResponse__'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    PageReorderRequest:
      properties:
        page_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Page Ids
          description: >-
            Complete ordered list of page UUIDs for this report. Pages will be
            re-sorted to match this order exactly.
      type: object
      required:
        - page_ids
      title: PageReorderRequest
      description: Request body for reordering the pages within a report.
    APIResponse_list_ReportPageResponse__:
      properties:
        success:
          type: boolean
          title: Success
          default: true
        data:
          anyOf:
            - items:
                $ref: '#/components/schemas/ReportPageResponse'
              type: array
            - type: 'null'
          title: Data
      type: object
      title: APIResponse[list[ReportPageResponse]]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ReportPageResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        sort_order:
          type: integer
          title: Sort Order
        layout_columns:
          type: integer
          title: Layout Columns
        widgets:
          items:
            $ref: '#/components/schemas/ReportWidgetResponse'
          type: array
          title: Widgets
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - name
        - sort_order
        - layout_columns
        - widgets
        - created_at
      title: ReportPageResponse
      description: A report page with its ordered list of widgets.
    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
    ReportWidgetResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        widget_type:
          type: string
          title: Widget Type
        data_source:
          anyOf:
            - type: string
            - type: 'null'
          title: Data Source
        title:
          type: string
          title: Title
        config:
          additionalProperties: true
          type: object
          title: Config
        position_x:
          type: integer
          title: Position X
        position_y:
          type: integer
          title: Position Y
        width:
          type: integer
          title: Width
        height:
          type: integer
          title: Height
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - widget_type
        - title
        - config
        - position_x
        - position_y
        - width
        - height
        - created_at
      title: ReportWidgetResponse
      description: A single report widget as returned by the API.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````