Draft vs published
How the preview branch exposes work in progress, and why nothing unpublished can reach staging or production.
A story in Storyblok holds two states at once: the published version that visitors see, and the draft an editor is working on. Exacta mirrors both — but only on the preview branch, and only for a preview token.
What each token sees
| Branch | Token | version=draft returns |
|---|---|---|
| Preview | preview | Draft content, plus stories that have never been published |
| Preview | public | Published content only |
| Staging / Production | preview | Published content only |
| Staging / Production | public | Published content only |
Asking for a draft where none can exist is not an error. The request succeeds and returns published content, so a preview-enabled codebase can be deployed to production unchanged.
# Editor preview — drafts included
curl "https://api.exacta.im/v2/cdn/stories?token=$EXACTA_PREVIEW_TOKEN&version=draft"
# Production — published only, whatever you ask for
curl "https://api.exacta.im/v2/cdn/stories?token=$EXACTA_PUBLIC_TOKEN&version=draft"Unpublished stories
A story that has never been published exists only on the preview branch. It is returned when you ask for drafts with a preview token, and is invisible otherwise — a public token gets 404 for it, and it is filtered out of list responses.
The _editable marker
Storyblok injects _editable markers into draft responses so its visual editor can map a rendered element back to a field. Exacta passes them through unchanged, because the editor bridge needs them.
- They are excluded from change detection, so a marker regenerating does not make a story look edited.
- Some spaces have markers baked into their published content as well. Those are copied faithfully — Exacta does not add or strip them.
Keeping preview fresh
| Parameter | Type | Description |
|---|---|---|
Sync | preview only | Pulls the current state of your Storyblok space — published and draft — into the preview branch. |
unpublished_changes | boolean | Reported per story in the dashboard. True when the draft has diverged from the published version, which is your signal that promoting will change what visitors see. |
Syncpreview onlyPulls the current state of your Storyblok space — published and draft — into the preview branch.
unpublished_changesbooleanReported per story in the dashboard. True when the draft has diverged from the published version, which is your signal that promoting will change what visitors see.