Builder content API does not return draft content when page is already published
Author: Andrzej-SchneiderCreated Apr 19, 2024Updated Mar 26, 2026
LabelsStale
Describe the bug
As in the title, builder content API:
https://cdn.builder.io/api/v3/content/my-model-name?apiKey=YOUR_API_KEY does not return a proper draft content when page had been already published before and then content changed. Even with includeUnpublished=true in params
const req = await fetch(
`${API_V3_CONTENT}/${modelName}/${contentId}?apiKey=${appState?.user?.apiKey}&cachebust=true&cacheSeconds=5&staleCacheSeconds=5&omit=endDate,startDate&enrich=true&includeUnpublished=true`,
);To Reproduce Steps to reproduce the behavior:
- create a new builder page add some custom components and click "Publish"
- get the content with the API call
- change some content on the page - edit some text values for example
- do not press "Publish Updates" but try to get the content again -> old content is being returned
Expected behavior New drafted content should be returned form API call
Screenshots
Page with some content:
Default: "Some text"
Published:
Getting content:
Changed content and not published updates:
Default: "Some text - new content"
Old content returned:
Additional context Add any other context about the problem here.
Source: BuilderIO/builder