When the draft/published system is enabled for a model, records will remain in a Draft status until they are Published.
When publishing a record, you can choose to either publish the whole record, or just some of its locales / non-localized content. This is similar to how the "Publish" dropdown button in the UI works.
This is the default behavior when you don't provide a request body.
This will publish the entire record, including all its localized and non-localized fields.
Do not include a request body at all — not even an empty object {}.
(No request body)
(No request body)
(No request body)
Published item:
Selective publishing is used when you don't want to publish the entire record. Instead, you can publish a combination of:
In this example, we will only publish the en locale. The it and es versions of localized_title will not be published, and will retain their previously published titles. non_localized_field will also keep its previously published value.
Publishing only the "en" locale
Publishing only the "en" locale
Publishing only the "en" locale
Published item with new English title. The Italian localized field and non-localized slug remain unchanged.
Query parameters
recursiveboolean
When recursive is true, if the record belongs to a tree-like collection, and any of the parent records aren't published, those parent records will published as well. When recursive is false or not specified, an UNPUBLISHED_PARENT error will occur in such cases.
Body parameters
For this endpoint, the body is not required
and can be entirely omitted.
typestringRequired
Must be exactly "selective_publish_operation".
Publish only the specified locales & non-localized content (see following attributes). To publish the entire record, simply avoid passing a request body to the endpoint.