Aveiro API
Authentication
Sites
List Sites
List Templates
Create Site
Update Site Layout
Chrome Strings
Update Collection
Pages
Create a Page
Delete a Page
List Pages
Reorder Pages
Update a Page
Site Media
Publish Site
Link Translation
Import Media from URL
Audience
Newsletter API Overview
Newsletter Campaigns
Social
Social API Overview
Social Accounts
Social Media
Social Posts
Social Performance
Website Mockup Video
Social Post Review
TrademarkTrademark
Ctrl k
Search…
Sign up
Aveiro API
Authentication
Sites
List Sites
List Templates
Create Site
Update Site Layout
Chrome Strings
Update Collection
Pages
Create a Page
Delete a Page
List Pages
Reorder Pages
Update a Page
Site Media
Publish Site
Link Translation
Import Media from URL
Audience
Newsletter API Overview
Newsletter Campaigns
Social
Social API Overview
Social Accounts
Social Media
Social Posts
Social Performance
Website Mockup Video
Social Post Review
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 22 days 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_ERROR
Missing fields, incomplete order list, or invalid mode
403FORBIDDEN
Missing 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 one tool per operation, each taking the same fields as the matching body above:
  • aveiro_reorder_pages — folder and order.
  • aveiro_move_page — page, folder, and optional position.
  • aveiro_set_folder_sort — folder and mode.
Default tokens with content:write can call them from Cursor or Claude.
Typical agent flow: aveiro_list_pages → build the desired order → aveiro_reorder_pages.

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" }