Publish or Unpublish Asset
cascade_publish_unpublishPublish or unpublish a Cascade asset to/from its configured destinations. Set unpublish: true to remove the asset from destinations.
Instructions
Publish a Cascade asset to its configured destinations, or unpublish it from those destinations.
The operation is controlled by the publishInformation payload: by default it publishes; set unpublish: true to remove the asset from its destinations instead. Publishing propagates changes to external systems (HTTP, FTP, filesystem targets). This can affect production websites — use with care. Publishing is asynchronous on Cascade's side; this call queues the job and returns quickly.
Args:
identifier (object, required): The asset to publish or unpublish
id (string, optional): Asset ID (preferred)
path (object, optional): { path, siteId OR siteName }
type (string, required): Entity type of the asset
publishInformation (object, required, shape varies — see Cascade docs):
destinations (array, optional): Specific destination identifiers. Omit for "all enabled destinations".
unpublish (boolean, optional, default false): When true, unpublish instead of publish.
publishRelatedAssets (boolean, optional): Also publish referenced assets.
publishRelatedPublishSet (boolean, optional): Also publish related publish sets.
scheduledDate (string, optional): ISO-ish date for scheduled (future) publish.
Returns: Cascade OperationResult: { success: true } On failure: { success: false, message: "" }
Examples:
Use when: "Publish a page now" -> { identifier: { type: "page", id: "..." }, publishInformation: {} }
Use when: "Unpublish a page" -> { identifier: { type: "page", id: "..." }, publishInformation: { unpublish: true } }
Use when: "Schedule publish for next week" -> { identifier: { ... }, publishInformation: { scheduledDate: "2026-04-20T12:00:00Z" } }
Don't use when: You want to delete entirely — use cascade_remove (which can unpublish too).
Don't use when: You haven't yet committed edits — Cascade publishes the last committed version.
Error Handling:
"Asset not found" when the identifier doesn't resolve
"No destinations configured" when the asset has no destinations and none were supplied
"Permission denied" when credentials lack publish rights
"Workflow required" when the asset's container demands workflow approval before publish. Responses are JSON text; structuredContent is authoritative when the response fits. Oversized responses return bounded _cache metadata for cascade_read_response. For cascade_read, read_mode controls preview versus raw Cascade payload shape.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| identifier | No | The asset to publish or unpublish. | |
| publishInformation | No | REQUIRED: Publish parameters (unpublish flag, destinations list, etc.). Matches Cascade's PublishInformation shape. |