Style a Page Region
helpcenter_update_template_regionStyle one region's wrapper on one page: its background, padding, bottom border and alignment.
It edits the help center's design DRAFT (its v2 template): the draft the dashboard's Template Editor opens, with a live preview. Nothing reaches visitors until helpcenter_publish_template — after editing, give the customer the Template Editor link from the result to review, and publish only when they ask. v2 help centers only (a classic one answers template_migration_required). Ids come from helpcenter_get_template.
config takes background (hex, or 'var(--hc-color-primary)' to follow the theme), padding (compact | standard | tall), borderBottom (boolean) and align (left | center); null resets one, and keys left out keep their value. Themes ship custom CSS that can paint a region itself (Compass paints the header and hero), and that CSS outranks this setting: when the outline marks the region "laid out by custom CSS", restyle it with helpcenter_add_template_css instead. This is the guide's update_region operation.
Args:
page, region: which region.
config (object): the styling keys to change.
etag (string, optional): from your last read or edit; refuses (stale_draft) if the draft changed since.
Returns: what each entry did (new ids), warnings worth relaying, and the draft status with its new etag.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| etag | No | Optimistic lock: the draft etag from your last read, or the one your last edit returned. When given, the call is refused (stale_draft) if someone changed the draft since — so you never build on a state you have not seen. Omit to apply to the current draft. | |
| page | Yes | Page kind: home, category, article, search, contact or notFound. | |
| config | Yes | Region styling: background (hex or 'var(--hc-color-primary)'), padding (compact | standard | tall), borderBottom (boolean), align (left | center). null resets one. | |
| region | Yes | Region of the page: header, hero, sidebar, main, footer or utility. | |
| 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. |