Page

Replace the content mapping of a page

Changed on

Replaces all container-to-contentlet assignments for the page (DEFAULT variant, or a named variant when 'variantName' is provided). This is a full replacement, not a patch: omitting a container slot removes its content. The body is a bare JSON array of container entries; each entry maps one container instance to its ordered list of contentlets. Duplicate entries are merged automatically. To build the payload, fetch GET /api/v1/page/json/{uri} first (faster than /render — no Velocity execution): use 'page.containers' for the path-based identifier and 'page.layout.body.rows[].columns[].containers[]' for the uuid of each slot.

post/api/v1/page/{pageId}/content

Request

Path parameters

pageIdstring required

Identifier of the HTML Page to update

Query parameters

variantNamestring

Variant name for A/B testing (defaults to DEFAULT)

Request body

identifierstring required

Container's path-based key, e.g. '//demo.dotcms.com/application/containers/default/'. Matches the keys in 'page.containers' returned by GET /api/v1/page/json/{uri} (or /render/{uri}). Not the database UUID.

uuidstring required

Slot instance identifier. Matches the 'uuid' in page.layout.body.rows[].columns[].containers[]. The same container can appear multiple times on a page with different UUIDs.

contentletsIdstring[] required

Ordered contentlet identifiers placed in this slot. An empty array clears the slot. This is a full replacement: omitted slots are removed from the page.

personaTagstring nullable

Optional persona tag for personalized content variants.

Example request

[
  {
    "identifier": "//demo.dotcms.com/application/containers/default/",
    "uuid": "10"
  }
]

Response

Contentlets saved successfully

Changes

    • breaking

      request body became required

    • breaking

      the request's body type changed from object to array

    • warning

      removed the request property

    • warning

      removed the request property

    • info

      api operation id addContent removed and replaced with addContentToPage

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the success response with the status