Connect the CMS to your site
Your website reads its content from the CMS with a secret key that can only read published content. You create the key once, put it in your site’s server environment, and the site starts reading.
Only owners and admins can connect a site.
Connect
Section titled “Connect”- Open CMS and click Website in the top bar. It reads Not connected until a site has read from it.
- Under Create a key, click Create key. Erre OS creates a secret key named “Website” with the Read website content permission.
- Copy the key. It starts with
erre_sk_and is shown only once. - Add it to your site’s environment as
ERRE_API_KEY. Keep it on the server; never put it in browser code. - Under Add it to your site, pick Astro, Next.js or fetch, and click Copy. The snippet reads your first collection with the key from
ERRE_API_KEY. - Deploy your site. The window shows Waiting for your site… until the site’s first request arrives, then Connected. Click Done.
The content API reference covers every route, filtering, caching and generated types.
Manage the key
Section titled “Manage the key”Keys live in Settings, then Developers, then API. From there you can:
- Roll a key to get a replacement, and choose when the old one stops working.
- Revoke a key. It stops on the very next request, and there is no undo.
If you lose the key, create a new one. Erre OS cannot show a secret key again.
To preview drafts on a staging site, create a key that also has Read unpublished website drafts. See Previewing drafts in the content reference.