## Reorder Pages in the ReadMe Dashboard
There are two ways to reorder pages within your sidebar.
**Option 1**: Press and hold the page you want to reorder to drag, and then drop it, into its desired new location.
**Option 2**: Click the three dot menu next to any page and select the Move To option, and from there see the available categories where you can re-locate that page to.
You can also reorder pages to be subpages of another page by following these steps:
Move the desired subpage below the parent page.
Click and hold the page, drag it to below the desired parent page, and drop it below and slightly to the right. It will appear as a subpage.
To undo this, simply move the subpage above the parent page and it will become a normal page.
## How to Reorder Pages via API
### How Ordering Works in Our API
To insert docs, you would use our [Create Docs API](🔗)
The way our docs ordering works is that each doc has an order attached to it and it works similar to how a z-index works in CSS. The numbers do not have to be consecutive, they are just sorted from low to high to determine the order.
By default, when a page is created it is set to 999. When multiple docs have an order of 999, we fall back to sorting by date created, so that newer pages always come last.
Our Update Docs API allows you to send us the order like so:
So if you had a tree returned from a category that looked like this:
To reorder these two pages so that some other page is first, you would issue two requests to the update page API (some headers omitted for brevity):
The order is always returned from the API, so you will be able to determine what the current order is either from the tree (which will be correctly ordered), or from a single document.
We have another property called `
parentDoc`, which you assign to a document when you create/update it to determine what the parent is. So given the following tree:
To create a nested doc underneath `
getting-started`, you would issue the following request:
This requires the parentDoc id, as well as the category id.