Publish entry
publish_entryPublish a collection entry to make it live. Bind the publish to what was reviewed: pass expectedRevisionId and expectedHeadAnchor (latestRevision.headAnchor from get_entry); hermes refuses if the draft changed since. When the entry has a pending address (draftSlug in get_entry, set through update_entry), this publish moves the page to it in the same step that makes the content live; pass that draftSlug as expectedAddress so the publish is refused if it changed meanwhile. redirectOldPath (default true) creates a redirect from the old address when the page had been public before; a first publish never needs one. When the collection has entry pages but its entry-page template has no sections yet, the result carries a warning: the entry is live but its page shows no body until the template is designed in the dashboard; tell the user.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entryId | Yes | The entry ID | |
| projectId | Yes | The project ID | |
| revisionId | Yes | The revision ID to publish (from get_entry latestRevision.id) | |
| expectedAddress | No | The pending address (draftSlug) the user reviewed; hermes refuses the publish if it changed since. Pass an empty string to insist that no move is pending. Omitted: the address pending at publish time is used. | |
| redirectOldPath | No | When a pending address moves a page that has been public before, redirect the old address to the new one. Default true. | |
| expectedHeadAnchor | No | latestRevision.headAnchor as read at review time | |
| expectedRevisionId | No | The head revision id the user reviewed |