Skip to content

CMS Page — Update

Updates a CMS page using a locale-nested payload.

The Payload Is Locale-Nested

Update writes per locale, so the translated fields go inside a block keyed by locale code — unlike Create, which takes them at the top level and broadcasts them to every locale:

json
{
  "locale": "en",
  "channels": [1],
  "en": {
    "url_key": "about-us",
    "page_title": "About Us",
    "html_content": "<h1>About Us</h1>"
  }
}

The top-level locale names which block is being written. Only that locale changes; the others are left untouched. url_key uniqueness excludes the page itself, so re-sending the current slug is not a collision. channels replaces the page's channel assignment rather than adding to it.

Changing a locale's url_key records a 301 redirect from the old slug to the new one, so existing links keep working. That redirect is permanent: it is not removed when the page is later deleted, so the old slug keeps redirecting to a URL that no longer resolves. Clean it up through URL Rewrites if that matters.

Endpoint

EndpointMethod
/api/admin/cms/pages/{id}PUT

Request body

FieldTypeRequiredNotes
localestringyesNames which locale block is being updated.
channelsint[]yesNon-empty array of existing channel IDs.
<locale>objectyesPer-locale block — url_key, page_title, html_content (required), plus optional meta_*.

Response

200 OK — same shape as GET /api/admin/cms/pages/{id}.

Errors

HTTPCause
404 Not FoundPage not found.
422 Unprocessable EntityMissing nested fields, duplicate url_key, or empty channels.

Released under the MIT License.