API
API
The delivery, management, site and agent APIs, the rich text and image formats they share, and the errors they answer with.
1 min read
Content has one API per job, and they share a token model: a delivery token reads published content, a preview token reads drafts, a management token changes the model and content, and a site token acts as an editor on their own site. Every token belongs to one space and one environment.
| API | Use it for |
|---|---|
| Delivery | Read a site's content with a delivery or preview token: pages by path, entries, locales, depth. |
| Management | Read, plan and apply the content model, and write content with a content-scoped token. The CLI and model-in-Git use it. |
| Site | What a site's server calls with an editor's site token, when editing on the site. The SDK's /cms handler forwards to it. |
| Agent API and MCP | Everything the dashboard does, over HTTP or as MCP tools, for agents. |
| Rich text | The document format rich text fields deliver, including embedded entries and assets, and Markdown. |
| Images | Resized, re-encoded copies of an image asset with a query on its URL. |
| Errors | Every error code, in RFC 9457 problem JSON. |
Start with API tokens for which token to create, and the JavaScript SDK for the client that sends them.