API reference

The public content-delivery API - what @cairn-cms/client and cairn typegen read from a deployed project.

Base URLhttps://api.cairn.press

Published

Read published content from a project's dataset. No token needed for a public project - this is what a deployed site calls at request or build time.

Preview

Read unpublished drafts through a short-lived preview session. Grants are minted server-side with a project token, then exchanged for a session cookie by the preview route in your app.

Schema

Read a project's published document and block types. Consumed by `cairn typegen` to generate TypeScript interfaces - rarely called directly.