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

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token (Authorization: Bearer sp_...). Created in the dashboard under Account > Tokens. See authentication.

Query parameters

ParameterTypeRequiredDescription
contentTypestringNoFilter by content type: blog, docs, standalone, or homepage. An unrecognised one is a 422, not an empty list.
limitintegerNoHow many pages to return, 1 to 1000. Defaults to 1000.
offsetintegerNoHow 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.

FieldTypeDescription
idstringShort page ID. Accepted anywhere a request takes a page id.
slugstringURL slug. A batch entry without an id is matched to its page by slug.
titlestringPage title.
contentTypestringblog, docs, standalone, or homepage.
sectionstringOnly when the page has a section. Nested sections appear as the full path (api/pages).
descriptionstringOnly when the page has a meta description.
apiEndpointstringOnly on API reference pages, as "METHOD /path".
draftbooleanDraft pages are left off the deployed site.
authorIdstringOnly when the page has an author.
hasPasswordbooleanWhether the page is password protected. The password itself is never returned.
tagsarrayOnly when the page has tags.
publishedAtstringRFC 3339. Only when set.
updatedAtstringRFC 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.