Aveiro API
Authentication
Sites
List Sites
List Templates
Create Site
Pages
Create a Page
Delete a Page
List Pages
Reorder Pages
Update a Page
Site Media
Publish Site
Audience
Newsletter API Overview
Newsletter Campaigns
Social
Social API Overview
Social Accounts
Social Media
Social Posts
Social Performance
Website Mockup Video
TrademarkTrademark
Ctrl k
Search…
Sign up
Aveiro API
Authentication
Sites
List Sites
List Templates
Create Site
Pages
Create a Page
Delete a Page
List Pages
Reorder Pages
Update a Page
Site Media
Publish Site
Audience
Newsletter API Overview
Newsletter Campaigns
Social
Social API Overview
Social Accounts
Social Media
Social Posts
Social Performance
Website Mockup Video
Sponsored
Aveiro
aveiro.app
Sponsored
Aveiro
aveiro.app
TrademarkTrademark
AveiroBlogContact
© Aveiro. All rights reserved.
Built with Aveiro

Reorder Pages

POST /api/v1/sites/{siteId}/reorder — reorder, move, or sort pages and folders.
Updated 1mo ago
List Pages
Update a Page
In short
POST /api/v1/sites/{siteId}/reorder changes page order inside a folder, moves a page into another folder, or sets a folder's sort mode. Requires content:write. Use `/` for the site root.

Request

POST /api/v1/sites/{siteId}/reorder
Authorization: Bearer av_live_…
Content-Type: application/json
Required scope: content:write The body is discriminated by operation:

operation: reorder

Set the exact order of pages inside one folder. order must list every page in that folder — positions are set to the list index.
{
  "operation": "reorder",
  "folder": "/blog",
  "order": ["/blog/intro.mdx", "/blog/setup.mdx", "/blog/faq.mdx"]
}
Use "folder": "/" for pages at the site root.

operation: move

Move a page into a folder. When position (0-based) is present, the destination folder is renumbered so the page lands at that slot; otherwise the page is appended.
{
  "operation": "move",
  "page": "/draft.mdx",
  "folder": "/blog",
  "position": 0
}

operation: sort

Set a folder's sort mode — the same setting the Pages panel uses. Root ("/") sets the site-wide default.
{
  "operation": "sort",
  "folder": "/blog",
  "mode": "recent"
}
mode must be one of: manual, name-asc, name-desc, recent, published.

Examples (curl)

Reorder pages in a collection:
curl -s -X POST 'https://help.aveiro.app/api/v1/sites/SITE_ID/reorder' \
  -H 'Authorization: Bearer av_live_…' \
  -H 'Content-Type: application/json' \
  -d '{
    "operation": "reorder",
    "folder": "/guides",
    "order": ["/guides/index.mdx", "/guides/quickstart.mdx", "/guides/api.mdx"]
  }'
Move a page to the top of the blog:

Responses

200 OK — operation succeeded:
Status
Code
When
400VALIDATION_ERRORMissing fields, incomplete order list, or invalid mode
403FORBIDDENMissing content:write or no access to the site
404PAGE_NOT_FOUNDpage path does not exist
404FOLDER_NOT_FOUNDfolder path does not exist

MCP tool

The Aveiro MCP server exposes aveiro_reorder_pages with the same operation, folder, order, page, position, and mode fields. Default tokens with content:write can call it from Cursor or Claude.
Typical agent flow: aveiro_list_pages → build the desired order → aveiro_reorder_pages with operation: "reorder".

Related

  • List pages
  • Create a page
  • Update a page
  • Platform help: Creating and organizing pages
curl -s -X POST 'https://help.aveiro.app/api/v1/sites/SITE_ID/reorder' \
  -H 'Authorization: Bearer av_live_…' \
  -H 'Content-Type: application/json' \
  -d '{
    "operation": "move",
    "page": "/announcement.mdx",
    "folder": "/blog",
    "position": 0
  }'
{ "ok": true, "operation": "reorder", "folder": "/blog", "count": 3 }
{ "ok": true, "operation": "move", "path": "/blog/announcement.mdx", "position": 0 }
{ "ok": true, "operation": "sort", "folder": "/blog", "mode": "recent" }