Create and Manage Landing Page Templates in Marketing Cloud Next

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.

1POST /services/data/{apiVersion}/connect/cms/contents

This table lists the properties in the request body.

FieldData TypeDescription
contentSpaceOrFolderIdstringRequired. ID of the content workspace or folder to create the template in.
contentTypestringRequired. Must be sfdc_cms__landingPageTemplate.
titlestringThe name of the template in the workspace.
urlNamestringA unique URL name for the template.
contentBody.sfdc_cms:titlestringRequired. The title of the template.
contentBody.sfdc_cms:seoProperties.titlestringRequired. The public page title. The template schema omits this property, but the template inherits the value from the landing page base type.
contentBody.sfdc_cms:blockobjectRequired. The root content block. Use sfdc_cms/rootContentBlock as the definition.

This sample request shows how to create a landing page template with components.

Request Example
1{
2  "contentSpaceOrFolderId": "0ZuXXXXXXXXXXXXXXX",
3  "contentType": "sfdc_cms__landingPageTemplate",
4  "title": "Product Launch Template",
5  "urlName": "product-launch-template",
6  "contentBody": {
7    "sfdc_cms:title": "Product Launch Template",
8    "sfdc_cms:seoProperties": {
9      "title": "Product Launch"
10    },
11    "sfdc_cms:block": {
12      "type": "block",
13      "definition": "sfdc_cms/rootContentBlock",
14      "children": []
15    }
16  }
17}

Here’s a sample response:

Response Example
1{
2  "contentKey": "MCXXXXXXXXXXXXXXXXXXXXXXXXXXX",
3  "contentType": {
4    "fullyQualifiedName": "sfdc_cms__landingPageTemplate",
5    "name": "Landing Page Template"
6  },
7  "managedContentId": "20YXXXXXXXXXXXXXXX",
8  "managedContentVariantId": "9PsXXXXXXXXXXXXXXX",
9  "status": {
10    "label": "Draft",
11    "status": "Draft"
12  },
13  "title": "Product Launch Template",
14  "urlName": "product-launch-template"
15}

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.

1POST /services/data/{apiVersion}/connect/cms/contents

This table lists the additional property for an HTML-based template.

PropertyData TypeDescription
contentBody.rawHtmlstringRequired. Raw HTML and Handlebars markup for the template. Responses return this value HTML-escaped.

This sample request shows how to create an HTML-based landing page template.

Request Example
1{
2  "contentSpaceOrFolderId": "0ZuXXXXXXXXXXXXXXX",
3  "contentType": "sfdc_cms__landingPageTemplate",
4  "title": "HTML Promo Template",
5  "urlName": "html-promo-template",
6  "contentBody": {
7    "sfdc_cms:title": "HTML Promo Template",
8    "sfdc_cms:seoProperties": {
9      "title": "Promo"
10    },
11    "rawHtml": "<section><h1>{{title}}</h1></section>",
12    "sfdc_cms:block": {
13      "type": "block",
14      "definition": "sfdc_cms/rootContentBlock",
15      "children": []
16    }
17  }
18}

Retrieve a Landing Page Template 

To get the details of a template, send a GET request with the template’s contentKey.

1GET /services/data/{apiVersion}/connect/cms/contents/{contentKey}

This sample request shows how to retrieve a landing page template.

Request Example
1GET /services/data/v69.0/connect/cms/contents/MCXXXXXXXXXXXXXXXXXXXXXXXXXXX

The response includes the contentBody, status, and identifiers, such as managedContentVariantId.

Here’s a sample response:

Response Example
1{
2  "apiName": "MCXXXXXXXXXXXXXXXXXXXXXXXXXXX",
3  "contentBody": {
4    "sfdc_cms:block": {
5      "definition": "sfdc_cms/rootContentBlock",
6      "type": "block",
7      "children": [],
8      "id": "5f0c1a2e-8d3b-4c6a-9e7f-1b2c3d4e5f60"
9    },
10    "sfdc_cms:seoProperties": {
11      "title": "Product Launch Template",
12      "isIndexed": false
13    },
14    "sfdc_cms:title": "Product Launch Template"
15  },
16  "contentKey": "MCXXXXXXXXXXXXXXXXXXXXXXXXXXX",
17  "contentSpace": {
18    "id": "0ZuXXXXXXXXXXXXXXX"
19  },
20  "contentType": {
21    "fullyQualifiedName": "sfdc_cms__landingPageTemplate",
22    "name": "Landing Page Template"
23  },
24  "isPublished": false,
25  "language": "en_US",
26  "managedContentId": "20YXXXXXXXXXXXXXXX",
27  "managedContentVariantId": "9PsXXXXXXXXXXXXXXX",
28  "managedContentVersionId": "5OUXXXXXXXXXXXXXXX",
29  "status": {
30    "label": "Draft",
31    "status": "Draft"
32  },
33  "title": "Product Launch Template",
34  "urlName": "product-launch-template"
35}

Update a Landing Page Template 

To update a landing page template, first retrieve it. The response includes the managedContentVariantId and the current contentBody of the template.

1PUT /services/data/{apiVersion}/connect/cms/contents/variants/{variantId}

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.

Request Example
1{
2  "contentBody": {
3    "sfdc_cms:title": "Product Launch Template (Fall)",
4    "sfdc_cms:seoProperties": {
5      "title": "Product Launch"
6    },
7    "sfdc_cms:block": {
8      "type": "block",
9      "definition": "sfdc_cms/rootContentBlock",
10      "children": []
11    }
12  }
13}

Clone a Landing Page Template 

To copy a template, send a POST request with its contentKey and an empty request body.

1POST /services/data/{apiVersion}/connect/cms/contents/{contentKey}/clone

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.

Request Example
1POST /services/data/v69.0/connect/cms/contents/MCXXXXXXXXXXXXXXXXXXXXXXXXXXX/clone

Here’s a sample response:

Response Example
1{
2  "apiName": "MCYYYYYYYYYYYYYYYYYYYYYYYYYYY",
3  "cloneStatus": {
4    "label": "Success",
5    "status": "Success"
6  },
7  "contentKey": "MCYYYYYYYYYYYYYYYYYYYYYYYYYYY",
8  "errorMessage": null,
9  "failedVariants": [],
10  "folder": {
11    "id": "9PuXXXXXXXXXXXXXXX"
12  },
13  "managedContentId": "20YYYYYYYYYYYYYYYY",
14  "resourceURL": "/services/data/v69.0/connect/cms/contents/MCYYYYYYYYYYYYYYYYYYYYYYYYYYY",
15  "sourceContentKeyOrId": "MCXXXXXXXXXXXXXXXXXXXXXXXXXXX",
16  "title": "Copy Of Product Launch Template",
17  "variants": []
18}

Delete a Landing Page Template 

To delete a template, send a DELETE request to the variants endpoint with the template’s managedContentVariantId.

1DELETE /services/data/{apiVersion}/connect/cms/contents/variants/{variantId}

A successful request returns 204 No Content.

This sample request shows how to delete a landing page template.

Request Example
1DELETE /services/data/v69.0/connect/cms/contents/variants/9PsXXXXXXXXXXXXXXX

Publish a Landing Page Template 

Publishing makes the template available to authors in the landing page builder.

1POST /services/data/{apiVersion}/connect/cms/contents/publish

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.

Here’s a sample response:

Response Example
1{
2  "deploymentId": "0jkXXXXXXXXXXXXXXX",
3  "description": "#DEPLOYED",
4  "publishDate": "2026-08-24T13:26:32.000Z"
5}

See Also