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

# ReorderTables

> Set the order a database's tables — what the user sees as tabs — appear in, left to right. Records, columns and names are untouched.  Use it when the user asks to move a tab, put tables in a particular order, or when tables you created should read in a sensible sequence (e.g. "Projects" before "Tasks"). Pass every table id of the database exactly once, in the new order; call DescribeDatabase first for the current ids, since a list that misses or adds a table is refused.  Requires edit access to the database. The response is the schema after the change. If `database` is null, the reorder still succeeded; call DescribeDatabase using databaseId before continuing.

# ReorderTables

Set the order a database's tables — what the user sees as tabs — appear in, left to right. Records, columns and names are untouched.

Use it when the user asks to move a tab, put tables in a particular order, or when tables you created should read in a sensible sequence (e.g. "Projects" before "Tasks"). Pass every table id of the database exactly once, in the new order; call DescribeDatabase first for the current ids, since a list that misses or adds a table is refused.

Requires edit access to the database. The response is the schema after the change. If `database` is null, the reorder still succeeded; call DescribeDatabase using databaseId before continuing.

## Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `databaseId` | string | Yes | Id of the database, from ListDatabases. |
| `tableIds` | string\[] | Yes | Every table id of the database, exactly once, in the new left-to-right order, from DescribeDatabase. |


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