Salesforce CMS Email Template Content API
1.0.0
Create email templates in Salesforce Content Management System (CMS) by using Connect API.
Email templates are based on sfdc_cms__email type but are designed to be reused.
Templates can have read-only schema sections. They support variants for different use cases.
This table lists the use cases that REST API supports for email templates.
| Supported Use Case | HTTP Verb | URI |
|---|---|---|
| Create an email template | POST | /services/data/{apiVersion}/connect/cms/contents |
| Get an email template | GET | /services/data/{apiVersion}/connect/cms/contents/{contentId} |
API Structure
This example shows the structure of an email template:
{
"contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
"contentType": "sfdc_cms__emailTemplate",
"contentBody": {
"sfdc_cms:title": "Email Template Title",
"sfdc_cms:description": "Template description",
"messagePurpose": "promotional",
"sfdc_cms:block": { ... }
}
}
Content Body Overview
The contentBody property contains content related to an email template, including CMS metadata.
| Property | Data Type | Description |
|---|---|---|
sfdc_cms:title |
string | Required. The title of the email template. |
sfdc_cms:description |
string | A description that helps identify the email template in the CMS. |
messagePurpose |
string | Required. The purpose of the email template. Possible values are promotional or transactional. |
sfdc_cms:block |
object | The main content body of the email template, represented as a hierarchical block structure. |
backgroundColor |
string | The background color of the email template. |
lightning:colorScheme |
string | The color scheme reference from brand settings. |
lightning:padding |
string | The padding settings from brand settings. |
lightning:dataProviders |
array | The data provider configurations for dynamic content. |
https://{subdomain}.my.salesforce.com
DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!