List sections
List every section on the site with its page count and, where set, its display title, description, and nav position. A section that has metadata but no pages is listed with a pageCount of 0, as in the dashboard.
GET https://sitepaste.com/api/v1/public/sites/{siteId}/sections
Requires the content scope.
Usage
curl "https://sitepaste.com/api/v1/public/sites/default/sections" \
-H "Authorization: Bearer $TOKEN"
Authorizations
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token (Authorization: Bearer sp_...). Created in the dashboard under Account > Tokens. See authentication. |
Query parameters
This collection is returned whole. It takes no limit or offset, and sending
either answers 422.
Response
{
"sections": [
{ "contentType": "docs", "slug": "setup", "title": "Setup & Install", "description": "", "position": null, "pageCount": 4 }
]
}