Show examples in:
Unpublish a record

In a model where the draft/published system is enabled, Published records can subsequently be Unpublished in order to return them to Draft status.

When unpublishing a record, you can choose to either unpublish the whole record, or just some of its locales, similar to how the "Unpublish" dropdown button in the UI sidebar works.

Example Unpublish entire record (all locales)
Example Selective unpublishing (unpublish specified locales only, keeping others published)

Query parameters

recursive  Optional  boolean  Example: true

When recursive is true, if the record belongs to a tree-like collection, and any of the children records are published, those children records will unpublished as well. When recursive is false or not specified, a PUBLISHED_CHILDREN error will occur in such cases.

Body Parameters

For this endpoint, the body is not required and can be entirely omitted
content_in_locales  Required  Array<string>  Examples: ["en"], ["en","it"]

Array of locales to publish. They must be currently published in this record. To unpublish all locales, do NOT use this parameter, but instead unpublish the entire record by leaving the body blank (see example above).

Returns

Returns a item resource object.