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

# Reorder sheets

> table_ids must list every live table of the workbook exactly once.



## OpenAPI

````yaml POST /v1/workbooks/{workbook_id}/tables/reorder
openapi: 3.1.0
info:
  title: Databar.ai API
  description: >-

    # Authentication


    Databar uses API keys to allow access to the API. You can find your API key
    in your workspace home page, but to use the REST API you’ll first need to
    schedule a call with us.

    Our API expects the API key to be included in all API requests to the server
    in the Header of your request with the key `x-apikey`.

    To find your API key, head over to your Databar workspace and click
    Integrations.


    **Example:**


    `bash

    curl https://api.databar.ai/v1/user/me -H x-apikey: {YOUR_API_KEY}`
  contact:
    email: info@databar.ai
  version: 0.1.2
servers:
  - url: https://api.databar.ai
    description: Production
security: []
paths:
  /v1/workbooks/{workbook_id}/tables/reorder:
    post:
      tags:
        - Workbook
      summary: Reorder sheets
      description: table_ids must list every live table of the workbook exactly once.
      operationId: reorder_workbook_tables
      parameters:
        - name: workbook_id
          in: path
          required: true
          schema:
            type: string
            description: Workbook identifier (wb_…).
          description: Workbook identifier (wb_…).
        - name: x-apikey
          in: header
          required: true
          schema:
            type: string
            title: API Key
            description: API Key for authentication
          description: API Key for authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReorderWorkbookTables'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workbook'
        '401':
          description: Missing or invalid API key
        '404':
          description: Not found
components:
  schemas:
    ReorderWorkbookTables:
      type: object
      title: ReorderWorkbookTables
      properties:
        table_ids:
          type: array
          items:
            type: string
            format: uuid
          minItems: 1
      required:
        - table_ids
    Workbook:
      type: object
      title: Workbook
      properties:
        identifier:
          type: string
        name:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
        folder_id:
          type:
            - integer
            - 'null'
        tables:
          type: array
          items:
            $ref: '#/components/schemas/WorkbookTable'
        tables_count:
          type: integer
      required:
        - identifier
        - name
        - created_at
        - updated_at
        - tables
        - tables_count
    WorkbookTable:
      type: object
      title: WorkbookTable
      properties:
        identifier:
          type: string
        name:
          type: string
        position:
          type: integer
      required:
        - identifier
        - name
        - position

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.