Skip to content

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.

  1. Open CMS and click Website in the top bar. It reads Not connected until a site has read from it.
  2. Under Create a key, click Create key. Erre OS creates a secret key named “Website” with the Read website content permission.
  3. Copy the key. It starts with erre_sk_ and is shown only once.
  4. Add it to your site’s environment as ERRE_API_KEY. Keep it on the server; never put it in browser code.
  5. 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.
  6. 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.

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.