authoring-publish-item
Queues asynchronous publishing of Sitecore items by IDs or paths, returning an operationId to poll for live status.
Instructions
Queues a publish of one or more items over the Authoring and Management API and returns an operationId. Publishing is asynchronous — the call returns as soon as the job is queued, so poll authoring-publishing-status with the operationId before reporting that content is live. On SitecoreAI the target is 'experienceedge'; on XM/XP it is usually 'web'. Supply exactly one of rootItemIds or rootItemPaths.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| languages | Yes | The languages to publish, e.g. ['en']. Required. | |
| displayName | No | A label for this publish, shown in Sitecore's publishing UI and job list. | |
| rootItemIds | No | GUIDs of the items to publish from. Supply this or rootItemPaths. | |
| rootItemPaths | No | Paths of the items to publish from, e.g. ['/sitecore/content/Home']. Supply this or rootItemIds. | |
| sourceDatabase | No | The database to publish from. Defaults to master. | |
| publishItemMode | No | SMART publishes only what changed; FULL republishes everything under the root regardless. SMART is the default and is what you normally want. | SMART |
| publishSubItems | No | When true, publish the descendants of each root item too. Off by default, so a bare call publishes one item. | |
| targetDatabases | Yes | The publishing targets, e.g. ['experienceedge'] on SitecoreAI or ['web'] on XM/XP. Required. This is the target's *database* name, not the publishing target item's name: on SitecoreAI the item is 'Edge' but the database is 'experienceedge', and 'Edge' is rejected. Read the right values from the 'Target database' field of /sitecore/system/Publishing targets. | |
| publishRelatedItems | No | When true, also publish items the content references, such as media and linked datasources. Off by default — a page can go live with unpublished images without this. |