# The CMS and its content API

> Where the CMS lives, who lands in it after signing in, and how websites and apps read your published content.

CMS user docs, v1.3.20. HTML: https://docs-next.commernauts.com/cms/content-api

In the dashboard: cms.commernauts.com, API

## The CMS has its own address

Why: writing pages is different work from running orders and stock, and people who only write should not have to find their way through the store dashboard. How: the CMS opens at cms.commernauts.com, with its own menu (Overview, Entries, Assets, Content Models, Taxonomies, Variants, Publish Queue, Releases, API) and a store switcher that stays in the CMS.

- One account and one sign-in serve both: open the CMS from the dashboard (Content) and you are signed in there too, without typing a password again.
- Signing out of either one signs you out of both.
- Store links in the CMS menu: View storefront for everyone, Store dashboard for the owner and for teammates with work there beyond content.
- Old dashboard links to content still work: they open the same page on the CMS address.

## Where you land after signing in

- Why: nobody should click through screens they cannot use. How: a teammate whose only role in every store is content (the Content role) goes straight to the CMS; with one store it opens that store, with several it asks which.
- Owners, and teammates with any other work (orders, products, marketing with discounts), land on the dashboard, with the CMS one click away under Content.

## Reading your content from a website or app

Why: the CMS is headless, so the same content can drive your storefront, a mobile app or another site. How: published content is JSON on your store's own address, readable without a key, because it is what your storefront shows anyway. Drafts and scheduled changes never appear. The API area in the CMS lists every address with a live link and one example entry per content model.

| Address | What it answers |
| --- | --- |
| /api/content/page?path=/ | A published page as data; path=/ is the home page |
| /api/content/entry/{id} | Any published entry: type, title and fields, references resolved |
| /api/content/product/{slug} | A product page's published copy and the product template's sections |
| /api/content/collection/{slug} | A collection page and the collection template's sections |
| /api/content/chrome | Header links, logo and footer |
| /api/content/entries?content_type={type} | Published entries as plain data: filter, search, sort, page, and include the entries they reference |
| /api/content/types | Your content models and their fields |
| /api/content/locales | Your store's languages |

Why: a website's preview mode should show drafts before you publish them, but drafts are private. How: in the CMS, API, Preview keys, make a key and give it to the site; it reads saved drafts through /api/preview/content/ with the same queries. The key is shown once. Revoke it and it stops working at once.

> Preview links from the entry editor still work for a quick look at one page. They expire and are never cached.

## Related

- [Content: pages and entries](https://docs-next.commernauts.com/cms/content.md)
- [Content models](https://docs-next.commernauts.com/cms/content-models.md)
- [Team and organisation](https://docs-next.commernauts.com/dash/team.md)
