List CMS collection items
List a page of published documents from a CMS collection, such as legal-pages, translations, or release-notes. Use this route when the app needs a collection rather than one known item.
Request
The route is:
GET /v1/public/cms/collections/:collection/items
Use listCmsDocuments() to request a page. For a signed-out read of an open collection, pass the tenant code and set allowSignedOut: true:
const page = await client.listCmsDocuments('legal-pages', {
tenantCode,
environment: 'staging',
locale: 'de-DE',
limit: 20,
allowSignedOut: true,
});
renderLegalPages(page.docs);
The example's client, tenantCode, and renderLegalPages() come from the application. The SDK maps regional language tags such as de-DE to the CMS locale de. The environment is optional, but spelling it out avoids accidentally reading the host's default environment.
Query parameters
| Parameter | Purpose |
|---|---|
tenant | Project tenant code. Required for a signed-out public read. |
projectId | Project UUID alternative to tenant. Prefer the tenant code when available. |
environment | dev, staging, or prod. An invalid value is ignored and the host default is used. |
locale | de, en, fr, or es. Defaults to English. |
page | Page number from 1 to 100. Defaults to 1. |
limit | Items per page from 1 to 50. Defaults to 20. |
sort | One top-level field; prefix it with - for descending order, such as -publishedAt. |
The response includes docs, totalDocs, totalPages, page, limit, and paging fields such as hasNextPage and nextPage. Continue while hasNextPage is true. A page past the end returns an empty docs array. The SDK options also accept page, sort, locale, tenantCode, environment, and allowSignedOut.
Access requirements
The legal-pages and translations collections are open by default, so a signed-out app can read them with a tenant code. An operator can change the open-collection list. Other collections require a signed-in user belonging to the tenant or a CMS API key.
Keep CMS API keys on a trusted server. Do not put a key in a client-side request, app configuration, or URL. For a server-side request, the platform recommends the Authorization: Bearer header for the key instead of a query parameter.
Ordering and shared content
The CMS can merge published shared documents with the project's documents. When the same slug exists in both, the project's document wins. Without sort, project documents are listed first in CMS order, followed by shared documents. With sort, the two lists are interleaved by the selected field.
List merging is skipped when either side exceeds 200 published documents. In that case, the response contains the project's list without the shared items. The API can return at most 5,000 documents across 100 pages.