---
title: "List a site's content keys"
method: GET
path: "/api/v1/sites/{slug}/content"
tags: ["Content"]
---

# List a site's content keys

`GET /api/v1/sites/{slug}/content`

## Request

- Base URL: `https://api.dotsy.ai`
- URL: `https://api.dotsy.ai/api/v1/sites/{slug}/content`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Lists the content keys of a site as the draft sees them: a staged edit replaces the live version and a staged delete hides it. That covers pages, layouts, fragments and data files. Site and page briefs are not listed. Each row's `status` tells you whether the key is live, modified or new. To read a key's body use `GET …/content/{key}`.

## Path parameters

- `slug` string, required

## Query parameters

- `limit` integer
- `cursor` string
- `withSize` boolean

## Response `200`

One page of content keys.

- ContentList
  - `content` ContentSummary[], required
    - `key` string, required: The content key.
    - `contentType` string, required
    - `contentHash` string, required: SHA-256 of the effective body: the staged draft if there is one, else the live version. Send it back as `If-Match` on a write to refuse the write if someone else changed the key meanwhile.
    - `updatedAt` number, required: Last write, Unix ms.
    - `status` 'live' | 'modified' | 'new', required: `live`: published, no staged edit. `modified`: published, with a staged edit. `new`: staged, never published.
    - `size` number, nullable: Body size in bytes. Measured only on pages of 100 rows or fewer, or when `withSize=1`; otherwise the field is absent. `null` means the stored bytes are missing (see `missing`).
    - `missing` boolean: `true` when the row points at stored bytes that are gone. A page that renders blank for this reason shows `size: null` and `missing: true`; a genuinely empty page shows `size: 0`.
  - `nextCursor` string, nullable, required: Pass as `cursor` (with the same `limit`) for the next page; null on the last page.
  - `partial` boolean, required: `true` when these keys are one window of the site's key space rather than all of it (the page index was missing, so the keys were read in bounded windows). Keep following `nextCursor`: a `null` cursor with `partial: true` does not mean the site is small.

## Other responses

- `400`: The `cursor` does not belong to this site's current storage (`invalid_cursor`). Restart the listing without it.
- `401`: Missing or invalid credentials.
- `403`: The key or token cannot read this site.
- `404`: No such site (`site_not_found`).

---

[API](https://skmtc.dev/dotsy/apis/dotsy-api.md) · [All operations](https://skmtc.dev/dotsy/apis/dotsy-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dotsy/apis/dotsy-api/revisions/4272ed3b85d7?raw)
