Schema

Get the project's published document types

GET/projects/{projectSlug}/schema

Requires an active preview session — either the cairn_preview cookie set by createPreviewHandler, or a preview session token sent as Authorization: Bearer <token>.

Path parameters

projectSlug*stringThe project's slug

Responses

200This project's document types, as `cairn typegen` and the schema builder both read them
401Authentication required
403Origin not allowed, or not a member of this project
404Unknown project

Request

curl "https://api.cairn.press/projects/my-project/schema" \
  -H "Authorization: Bearer $CAIRN_PREVIEW_TOKEN"

Response · 200

[
  {}
]