Publish the Help Center Design
helpcenter_publish_templatePut the draft live: every visitor sees the new design from now on. Records a version (restorable later) and starts a fresh draft from it — exactly the Template Editor's Publish button.
A help center's design is its v2 template: theme tokens (colours for light and dark mode, fonts, radius, density), six page kinds (home, category, article, search, contact, notFound), each built from six regions (header, hero, sidebar, main, footer, utility) holding ordered components, plus a global navigation menu, custom CSS and scripts. You edit a DRAFT — the same draft the dashboard's Template Editor opens, with a live preview — and nothing reaches visitors until helpcenter_publish_template. Only v2 help centers can be edited: a classic (v1) one answers template_migration_required, and migrating is the owner's decision, made in the dashboard.
This is the ONE template call that changes the live help center. Publish only when the customer has asked you to — ideally after they reviewed the draft in the Template Editor (the customizer link from helpcenter_get_template). Pass the etag they reviewed, so a draft that changed after their review is refused rather than published unseen.
Args:
message (string, optional): a note for the version history, e.g. 'Brand refresh'.
etag (string, optional): the reviewed draft's etag.
Returns: the published version and the new draft status.
Errors: 409 nothing_to_publish when the draft matches the live design; 412 stale_draft when the draft changed after the etag.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| etag | No | The draft etag the customer reviewed. When given, publishing is refused if the draft changed since — so exactly what was reviewed goes live. | |
| message | No | A short note for the version history, e.g. 'Brand refresh'. | |
| agent_key | Yes | The api_key helpcenter_create_help_center returned for this help center, exactly as returned. Required on every call: this endpoint has no sign-in, so the key is how each call says which help center it acts on. It is sent to HelpCenter.io as this call's credential and nowhere else, and it is never shown again: keep it for the whole task, and never show it to the user or write it into content. |