API overview
Everything is served under /api, with JSON on both sides.
Authentication
Section titled “Authentication”Every request except the health check needs an API key:
Authorization: Bearer <API_KEY>The key is configured in .env next to cms.config.ts and must never be committed. A missing key returns 401; a key without permission returns 403.
Endpoints
Section titled “Endpoints”| Method | Path | Description |
|---|---|---|
GET |
/api/collections/:name |
List entries in a collection |
GET |
/api/collections/:name/:id |
Fetch a single entry |
POST |
/api/collections/:name |
Create an entry |
PATCH |
/api/collections/:name/:id |
Partially update an entry |
DELETE |
/api/collections/:name/:id |
Delete an entry |
Pagination
Section titled “Pagination”List endpoints accept limit (default 20, max 100) and cursor:
GET /api/collections/post?limit=20&cursor=eyJpZCI6MTJ9The response carries the cursor for the next page; nextCursor is null on the last page:
{ "items": [{ "id": 12, "title": "Hello" }], "nextCursor": null}Error codes
Section titled “Error codes”| Status | Meaning |
|---|---|
400 |
The body does not match the model; details names the offending field |
401 |
Missing or invalid API key |
403 |
Valid key without permission for this collection |
404 |
Collection or entry not found |
409 |
Unique field conflict, for example a duplicate slug |
Every product shares the same error envelope: { error: { code, message, details? } }.

