Planned for
Locale-based publishing request header for the Content Delivery API and GraphQL API
Contentful has added locale-based publishing support to the Content Delivery API (CDA) and GraphQL Content API. The X-Contentful-Locale-Based-Publishing: true request header makes delivery requests follow the publishing status of each locale instead of relying only on the publishing status of the entry.
This update helps teams keep draft or incomplete localized content out of production, coordinate multilingual launches more confidently, and use the same publishing expectations across the CDA and GraphQL Content API.
Send the X-Contentful-Locale-Based-Publishing: true request header with CDA or GraphQL Content API requests to enable locale-based publishing behavior:
- Published locales - The APIs check entry.sys.fieldStatus and resolve content only for locales that are marked as published.
- Unpublished locales - The CDA returns a 404 response for an unpublished locale. The GraphQL Content API returns
nullfor the field result. - Fallback locales - Fallbacks can still be used to resolve content, but they don't change the publishing status of the requested locale. A published fallback locale doesn't make an unpublished locale visible.
- Added locales - After a locale is added to a space, entries must be republished before that locale is returned by the CDA.
- Entry-level publishing - For customers using entry-level publishing only, adding the header doesn't change API behavior. The header is backward compatible and locale-based publishing is planned to become the default behavior in a later release.
For more information, refer to Content Delivery API and GraphQL Content API.