List pages
List all pages for a site. Returns metadata only, not content bodies. Use the returned id for ID-based updates in later batch calls. That is how slugs are renamed.
GET https://sitepaste.com/api/v1/public/sites/{siteId}/pages
Requires the content scope.
Usage
curl "https://sitepaste.com/api/v1/public/sites/default/pages?contentType=docs" \
-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
| Parameter | Type | Required | Description |
|---|---|---|---|
| contentType | string | No | Filter by content type: blog, docs, standalone, or homepage. An unrecognised one is a 422, not an empty list. |
| limit | integer | No | How many pages to return, 1 to 1000. Defaults to 1000. |
| offset | integer | No | How many to skip. Defaults to 0. |
A limit or offset outside those bounds is a 422. So is a section, tag, draft, status, q, type, sortOrder, or page parameter, which this list does not take.
Response
{
"pages": [
{
"id": "k3m9x2q7r4pz",
"slug": "list-pages",
"title": "List pages",
"contentType": "standalone",
"section": "api/pages",
"description": "List page metadata for a site",
"apiEndpoint": "GET /pages",
"draft": false,
"authorId": "a7xkq3mz9r2t",
"hasPassword": false,
"tags": ["reference"],
"publishedAt": "2026-01-15T10:00:00Z",
"updatedAt": "2026-02-08T12:00:00Z"
}
],
"total": 4210,
"limit": 1000,
"offset": 0
}
total counts every page that matches contentType, not only the ones returned.
The homepage sorts first, and everything else is ordered by most recently updated, with ties broken by id. Paging with limit and offset visits every page exactly once, even when several share a timestamp. updatedAt advances only when a write changes one of the page’s own fields, so a request that stores a page’s existing values leaves both this order and the page’s ETag where they were. Changing only a page’s tags leaves this order untouched.
| Field | Type | Description |
|---|---|---|
| id | string | Short page ID. Accepted anywhere a request takes a page id. |
| slug | string | URL slug. A batch entry without an id is matched to its page by slug. |
| title | string | Page title. |
| contentType | string | blog, docs, standalone, or homepage. |
| section | string | Only when the page has a section. Nested sections appear as the full path (api/pages). |
| description | string | Only when the page has a meta description. |
| apiEndpoint | string | Only on API reference pages, as "METHOD /path". |
| draft | boolean | Draft pages are left off the deployed site. |
| authorId | string | Only when the page has an author. |
| hasPassword | boolean | Whether the page is password protected. The password itself is never returned. |
| tags | array | Only when the page has tags. |
| publishedAt | string | RFC 3339. Only when set. |
| updatedAt | string | RFC 3339. |
Downloading every page as Markdown
The same URL serves a zip of every page’s Markdown when you ask for one:
curl "https://sitepaste.com/api/v1/public/sites/default/pages" \
-H "Authorization: Bearer $TOKEN" \
-H "Accept: application/zip" \
-o pages.zip
Entries are named {contentType}/{section}/{slug}.md, and drafts are included. The zip always holds every page on the site and takes no query parameters: limit, offset, contentType, and the filters above each answer 422.
The zip draws on the hourly budget for expensive operations. The JSON list does not.
An Accept header that matches neither JSON nor zip gets a 406.