Create and Manage Landing Page Templates in Marketing Cloud Next
This Page
All Documentation
Use the content management system (CMS) Contents endpoints in Connect API to create and manage landing page templates programmatically. A landing page template is a reusable blueprint for building landing pages in a content workspace. Templates use the sfdc_cms__landingPageTemplate content type, which inherits from the sfdc_cms__landingPage content type.
Prerequisites
To create a landing page template, get the ID of the content workspace where you want to create it. Pass this ID as the contentSpaceOrFolderId field. See Manage Content Workspaces.
Landing page templates require the Landing Page Templates and CMS Templates org permissions.
To delete a template that’s part of a publication schedule, cancel the schedule first.
Create a Landing Page Template with Components
To build a landing page template from content blocks, provide a block structure in sfdc_cms:block. The blocks define a structured layout of sections and columns that authors can extend.
To create a landing page template, send a POST request to the contents endpoint.
The request creates the template in the Draft status. Copy the managedContentId field value to publish the template later.
Note
Create a Landing Page Template with HTML
To create an HTML-based template, include a rawHtml string in contentBody instead of building a component tree. The rawHtml property supports HTML and Handlebars expressions.
The request replaces the contentBody of the variant. Include the complete contentBody that you want in the template. If the request omits properties, the values of those properties are cleared.
This sample request shows how to update a landing page template.
The copy is created in Draft status, and the title is prefixed with “Copy Of.” The response omits the managedContentVariantId, which you need to update or delete the copy. To get this ID, retrieve the copy with its contentKey.
This sample request shows how to clone a landing page template.
In the request body, provide the managedContentId in the contentIds field. Specify the content ID, and not the content key.
This sample request shows how to publish a landing page template.
Request Example
1{2 "contentIds": ["20YXXXXXXXXXXXXXXX"]3}
Unlike the publishing process for a landing page, the process for a template is synchronous, and the template moves to the Published status. Retrieve the template to confirm that isPublished is true.