thincms_update_page
Update an existing static page with partial changes: modify title, slug, content, SEO fields, or status. Auto-creates 301 redirect on slug change.
Instructions
Update an existing static page. Only provided fields are changed (partial update). Content should be raw HTML. For large content (>10KB), use contentFile instead of content. Changing slug auto-creates a 301 redirect from the old URL.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Page ID (required) | |
| slug | No | URL slug | |
| title | No | Page title | |
| jsonLd | No | Custom JSON-LD (Schema.org) injected verbatim into the page <head>. Pass valid JSON as a string. Use for Service, Event, BreadcrumbList, HowTo, Article, etc. Set to empty string to clear. | |
| siteId | No | Override the active site for this single call. Pass to target a specific tenant without mutating shared active-site state — the right pattern when running concurrent agent sessions managing different tenants. Must match a siteId from your THINCMS_SITES config (use thincms_list_sites to inspect). When omitted, the call uses the active site set by thincms_switch_site. | |
| status | No | Page status | |
| content | No | HTML content | |
| noIndex | No | Set true to add noindex meta tag | |
| metaTitle | No | SEO meta title | |
| ogImageUrl | No | Open Graph image URL | |
| renderMode | No | Render mode | |
| contentFile | No | Local file path containing HTML content — use this instead of content for large pages (>10KB). | |
| canonicalUrl | No | Canonical URL | |
| metaDescription | No | SEO meta description | |
| confirmProductionWrite | No | Acknowledge that this call may write to a configured production site (THINCMS_PRODUCTION_SITE_IDS env var). Required for any POST/PUT/PATCH/DELETE against a production-listed site; ignored otherwise. The error message lists which site triggered the requirement and recommends thincms_snapshot before any production write. |