Want to deliver your StoryChief content to a headless website or app? The Content Delivery API is built exactly for that: a fast, read-only API designed to fetch published articles, tags, categories, and authors. All scoped to a specific destination.
What is the Content Delivery API?
The Content Delivery API is a read-only, high-performance API that allows you to serve published StoryChief content to external platforms like:
Headless websites
Mobile apps
Frontend frameworks (Next.js, Nuxt, etc.)
🔔 Note: This API only delivers published content. Creating or editing content is handled by other (internal) APIs.
It is designed to be:
Fast & cache-friendly
Scoped per destination
Consistent across all content types
💡 Tip: If your developing locally, you can use our Postman collection (find the "Run in Postman" button in the header of our documentation) or use ngrok.com to tunnel to your local machine.
In this article
1. Setting up the Headless CMS channel in StoryChief
Step 1. On the dashboard, open the menu (click your profile picture) and select 'Integrations'.
Step 2. In the Personal websites section, select 'Headless website'.
Step 3. Here, choose 'Add new destination'.
Step 4. On top of the new connection, the Destination ID will be provided (see 'API ID').
Step 5. Below, in the Channel settings, fetch the key to use in your connection and fill in the webhook endpoint to which articles or updates are being sent.
2. Create a personal access token
Step 1. In the settings, go to 'API'
Step 2. Click '+ New token'.
Step 3. Save this token somewhere save, or add it to Postman.
Make sure you have:
A valid destination ID
A Content Delivery API token
The required scope:
content:read
💡 Tip: Your token controls what you can access. Without the right scope, requests will fail.
In order to make authenticated requests to the REST API you need a bearer token.
The easiest way to get started is creating a Personal Access Token and save it in the CDA_BEARER_TOKEN and DESTINATION_ID environment variable.
You can find the DESTINATION_ID on the edit page of your Headless Website (see API ID).
3. Initial loading of content on the website
Once your Headless CMS channel is set up and you have your API credentials, the next step is to populate your website with content.
This process is often called initial hydration—it simply means fetching all the published content from StoryChief and displaying it on your website or app.
At a high level, this involves:
Connecting your website to the Content Delivery API using your token and destination ID
Requesting the main content types you need (such as articles, categories, and authors)
Storing or rendering that content in your frontend
Most teams handle this in one of two ways:
At build time (for static sites): content is fetched once when the site is deployed
At runtime: content is fetched dynamically when users visit your site
💡 Tip: Because the API is cache-friendly, you can safely store responses temporarily to improve performance.
At the end of this step, your website should display all published StoryChief content correctly.
For detailed request structure and endpoints, refer to the official API spec:
https://developers.storychief.io/#bf658fbf-390d-4b2b-9425-169d736ec6fa
4. Keeping content up-to-date with webhooks (cache invalidation)
After the initial setup, you’ll want your website to stay in sync whenever content changes in StoryChief.
This is where webhooks come in.
A webhook is a notification sent by StoryChief whenever something changes—like when an article is published, updated, or removed.
To use webhooks effectively:
Configure a webhook endpoint in your Headless CMS channel
Let your system listen for incoming updates from StoryChief
When a change is detected, clear or refresh the affected cached content
This process is known as cache invalidation.
Instead of constantly re-fetching all content, your website only updates what has changed. This keeps things fast while ensuring visitors always see the latest version.
Typical flow:
Content is updated in StoryChief
A webhook is sent to your system
Your system clears or refreshes the relevant cached content
The next visitor receives the updated version
💡Tip: You don’t need to refresh everything—only the content that changed.
With these steps in place, your headless setup will both load content efficiently and stay up-to-date automatically.
Localization
You can filter content by language:
?lang=en
🔔 Note:
If multiple languages share the same slug, you may need to specify lang.
🎉 🎉 Congratulations, that's a wrap! Now, you're ready to start publishing articles on your website.





