Reorder nav groups
Set the site’s nav-group order in one request. It lands whole or not at all. The order covers docs, blog, and the root standalone section slugs, first to last.
PATCH https://sitepaste.com/api/v1/public/sites/{siteId}/sections
Requires the content scope.
Usage
curl -X PATCH "https://sitepaste.com/api/v1/public/sites/default/sections" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "order": ["docs", "guides", "blog"] }'
Authorizations
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token (Authorization: Bearer sp_...). Created in the dashboard under Account > Tokens. See authentication. |
Body
| Field | Type | Required | Description |
|---|---|---|---|
| order | array | Yes | The nav groups, first to last, at most 50. Every entry must be docs, blog, or a root standalone section slug. A slug naming a section with no pages yet is accepted and gives that section metadata. It must be well formed, and a name reserved for standalone sections is a 422. |
Response
204 No Content. An empty order, one listing more than 50 groups, or a repeated or unrecognised group is a 422 naming the order field, and nothing is written.
The order writes metadata for every group it names, so it counts against the site’s cap of 100 sections with metadata. An order that would put the site past it is a 409, and nothing is written. The same request succeeds once another section’s metadata is cleared.