
# 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.

```sh
GET https://sitepaste.com/api/v1/public/sites/{siteId}/sections
```

Requires the `content` scope.

## Usage

```bash
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](/api/authentication). |


## Query parameters

This collection is returned whole. It takes no `limit` or `offset`, and sending
either answers 422.

## Response

```json
{
  "sections": [
    { "contentType": "docs", "slug": "setup", "title": "Setup & Install", "description": "", "position": null, "pageCount": 4 }
  ]
}
```