---
schema_version: "1"
id: bdf1baf61209ed3754ef0573d1d819fb26c5685aee64e35a077aa4a74d7bd982
title: Content - Email Template (Connect API)
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/mc-core/references/generated-api-specs/mc-next-email-template.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-growth/references/mc-next-email-template
source_site: developer.salesforce.com
content_type: documentation
content_hash: edfef64f5ab2ea805eff26ac05baee677fa08953d6736368264c6eced2036bb0
products:
  - Marketing Cloud Next
  - Marketing Cloud
---
Content - Email Template (Connect API)

# Content - Email Template (Connect API)

Manage email templates in Marketing Cloud Next by using Connect API.

Email templates are based on the [email content type](/docs/marketing/marketing-cloud-growth/references/mc-next-email-content-body) 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 the API supports for email templates.

| Supported Use Case | HTTP Verb | URI |
| --- | --- | --- |
| Create an email template | [POST](/docs/marketing/marketing-cloud-growth/references/mc-next-email-template?meta=createEmailTemplate) | /services/data/{apiVersion}/connect/cms/contents |
| Get an email template | [GET](/docs/marketing/marketing-cloud-growth/references/mc-next-email-template?meta=getEmailTemplate) | /services/data/{apiVersion}/connect/cms/contents/{contentId} |

### API Structure

This example shows the structure of an email template:

```json
{
  "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. |

**Version:** 1.0.0

## Servers

*   `https://{subdomain}.my.salesforce.com`
    *   `subdomain (default (no default)) The unique API subdomain for your Salesforce org.`

## Tags

### Email Template

Operations for managing email templates.

## Operations

### POST createEmailTemplate

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

Operation ID: `createEmailTemplate`. Tags: Email Template.

Create an email template content item.

#### Parameters

*   `apiVersion` (path, string, required) The API version.  
    Default: `v68.0`.

#### Request body (required)

Media type: `application/json`. Schema: `EmailTemplateRequest`.

_Example: basicTemplate_ Basic email template

```
{
  "contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
  "contentType": "sfdc_cms__emailTemplate",
  "contentBody": {
    "sfdc_cms:title": "Welcome Email Template",
    "sfdc_cms:description": "Standard welcome email for new customers",
    "messagePurpose": "transactional",
    "backgroundColor": "#f3f3f3",
    "lightning:colorScheme": "{!$brand.colorScheme}",
    "lightning:padding": "{!$brand.spacing.none}",
    "sfdc_cms:block": {
      "type": "block",
      "definition": "sfdc_cms/rootContentBlock",
      "children": [
        {
          "type": "block",
          "definition": "lightning/section",
          "attributes": {
            "stackOnMobile": true,
            "lightning:colorScheme": "{!$brand.colorScheme}"
          },
          "children": [
            {
              "type": "block",
              "definition": "lightning/column",
              "attributes": {
                "columnWidth": 12
              },
              "children": [
                {
                  "type": "block",
                  "definition": "lightning/heading",
                  "attributes": {
                    "level": 1,
                    "text": "Welcome to our service!"
                  }
                }
              ]
            }
          ]
        }
      ]
    }
  }
}
```

#### Responses

*   **201** The email template was created successfully.
    
    Media type: `application/json`. Schema: `EmailTemplateResponse`.
    
    _Example_
    
    ```
    {
      "apiName": "MCJUR5WKNRHZFP7NAUQOMMNJ7CI4",
      "contentKey": "MCJUR5WKNRHZFP7NAUQOMMNJ7CI4",
      "contentFqn": "marketing--Default_Content_Workspace.sfdc_cms__emailTemplate--MCJUR5WKNRHZFP7NAUQOMMNJ7CI4",
      "contentSpace": {
        "id": "0ZuSB000002FYzW0AW",
        "resourceUrl": "/services/data/v68.0/connect/cms/spaces/0ZuSB000002FYzW0AW"
      },
      "contentType": {
        "fullyQualifiedName": "sfdc_cms__emailTemplate"
      },
      "createdBy": {
        "id": "005SB00000eaki1YAA",
        "name": "Admin User",
        "resourceUrl": "/services/data/v68.0/chatter/users/005SB00000eaki1YAA"
      },
      "createdDate": "2026-06-30T10:30:00.000Z",
      "externalId": null,
      "folder": {
        "id": "9PuSB000002KUDo0AO",
        "resourceUrl": "/services/data/v68.0/connect/cms/folders/9PuSB000002KUDo0AO"
      },
      "isPublished": false,
      "language": "en_US",
      "lastModifiedBy": {
        "id": "005SB00000eaki1YAA",
        "name": "Admin User",
        "resourceUrl": "/services/data/v68.0/chatter/users/005SB00000eaki1YAA"
      },
      "lastModifiedDate": "2026-06-30T10:30:00.000Z",
      "managedContentId": "20YSB000004SkOz2AK",
      "managedContentVariantId": "9PsSB0000045XAj0AM",
      "managedContentVersionId": "5OUSB000004K7np4AC",
      "status": {
        "label": "Draft",
        "status": "Draft"
      },
      "title": "Welcome Email Template",
      "urlName": "welcome-email-template",
      "versionNumber": "1.0",
      "contentBody": {
        "sfdc_cms:title": "Welcome Email Template",
        "sfdc_cms:description": "Standard welcome email for new customers",
        "messagePurpose": "transactional",
        "backgroundColor": "#f3f3f3",
        "lightning:colorScheme": "{!$brand.colorScheme}",
        "lightning:padding": "{!$brand.spacing.none}",
        "sfdc_cms:block": {
          "type": "block",
          "definition": "sfdc_cms/rootContentBlock",
          "children": [
            {
              "type": "block",
              "definition": "lightning/section",
              "attributes": {
                "stackOnMobile": true,
                "lightning:colorScheme": "{!$brand.colorScheme}"
              },
              "children": [
                {
                  "type": "block",
                  "definition": "lightning/column",
                  "attributes": {
                    "columnWidth": 12
                  },
                  "children": [
                    {
                      "type": "block",
                      "definition": "lightning/heading",
                      "attributes": {
                        "level": 1,
                        "text": "Welcome to our service!"
                      }
                    }
                  ]
                }
              ]
            }
          ]
        }
      }
    }
    ```
    
*   **400** The request body or parameters are invalid.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example: missingRequiredField_ Missing required field
    
    ```
    {
      "error": "VALIDATION_ERROR",
      "message": "Required field 'messagePurpose' is missing",
      "details": [
        {
          "field": "contentBody.messagePurpose",
          "message": "This field is required"
        }
      ]
    }
    ```
    
    _Example: invalidBlockStructure_ Invalid block structure
    
    ```
    {
      "error": "VALIDATION_ERROR",
      "message": "Invalid block structure in template",
      "details": [
        {
          "field": "contentBody.sfdc_cms:block",
          "message": "Root block must be of type 'sfdc_cms/rootContentBlock'"
        }
      ]
    }
    ```
    
*   **401** The authentication credentials are missing or invalid.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "error": "UNAUTHORIZED",
      "message": "Authentication credentials are missing or invalid"
    }
    ```
    
*   **403** The user doesn’t have the permissions required to perform the operation.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "error": "FORBIDDEN",
      "message": "Insufficient permissions to create email templates"
    }
    ```
    
*   **500** An unexpected error occurred while processing the request.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "error": "INTERNAL_SERVER_ERROR",
      "message": "An unexpected error occurred while processing the request"
    }
    ```
    
*   **503** The service is unavailable.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "error": "SERVICE_UNAVAILABLE",
      "message": "The service is temporarily unavailable. Please try again later"
    }
    ```
    

### GET getEmailTemplate

`GET /services/data/{apiVersion}/connect/cms/contents/{contentId}`

Operation ID: `getEmailTemplate`. Tags: Email Template.

Retrieve a specific email template content item.

#### Parameters

*   `apiVersion` (path, string, required) The API version.  
    Default: `v68.0`.
*   `contentId` (path, string, required)

#### Responses

*   **200** The email template was retrieved successfully.
    
    Media type: `application/json`. Schema: `EmailTemplateResponse`.
    
    _Example_
    
    ```
    {
      "apiName": "MCJUR5WKNRHZFP7NAUQOMMNJ7CI4",
      "contentKey": "MCJUR5WKNRHZFP7NAUQOMMNJ7CI4",
      "contentFqn": "marketing--Default_Content_Workspace.sfdc_cms__emailTemplate--MCJUR5WKNRHZFP7NAUQOMMNJ7CI4",
      "contentSpace": {
        "id": "0ZuSB000002FYzW0AW",
        "resourceUrl": "/services/data/v68.0/connect/cms/spaces/0ZuSB000002FYzW0AW"
      },
      "contentType": {
        "fullyQualifiedName": "sfdc_cms__emailTemplate"
      },
      "createdBy": {
        "id": "005SB00000eaki1YAA",
        "name": "Admin User",
        "resourceUrl": "/services/data/v68.0/chatter/users/005SB00000eaki1YAA"
      },
      "createdDate": "2026-06-30T10:30:00.000Z",
      "externalId": null,
      "folder": {
        "id": "9PuSB000002KUDo0AO",
        "resourceUrl": "/services/data/v68.0/connect/cms/folders/9PuSB000002KUDo0AO"
      },
      "isPublished": false,
      "language": "en_US",
      "lastModifiedBy": {
        "id": "005SB00000eaki1YAA",
        "name": "Admin User",
        "resourceUrl": "/services/data/v68.0/chatter/users/005SB00000eaki1YAA"
      },
      "lastModifiedDate": "2026-06-30T10:30:00.000Z",
      "managedContentId": "20YSB000004SkOz2AK",
      "managedContentVariantId": "9PsSB0000045XAj0AM",
      "managedContentVersionId": "5OUSB000004K7np4AC",
      "status": {
        "label": "Draft",
        "status": "Draft"
      },
      "title": "Welcome Email Template",
      "urlName": "welcome-email-template",
      "versionNumber": "1.0",
      "contentBody": {
        "sfdc_cms:title": "Welcome Email Template",
        "sfdc_cms:description": "Standard welcome email for new customers",
        "messagePurpose": "transactional",
        "backgroundColor": "#f3f3f3",
        "lightning:colorScheme": "{!$brand.colorScheme}",
        "lightning:padding": "{!$brand.spacing.none}",
        "sfdc_cms:block": {
          "type": "block",
          "definition": "sfdc_cms/rootContentBlock",
          "children": [
            {
              "type": "block",
              "definition": "lightning/section",
              "attributes": {
                "stackOnMobile": true
              },
              "children": [
                {
                  "type": "block",
                  "definition": "lightning/column",
                  "attributes": {
                    "columnWidth": 12
                  },
                  "children": [
                    {
                      "type": "block",
                      "definition": "lightning/heading",
                      "attributes": {
                        "level": 1,
                        "text": "Welcome to our service!"
                      }
                    }
                  ]
                }
              ]
            }
          ]
        }
      }
    }
    ```
    
*   **404** The requested resource wasn’t found.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "error": "NOT_FOUND",
      "message": "Email template with ID '20Y6g000000001GEAQ' not found"
    }
    ```
    

## Schemas

### EmailTemplateRequest

An object that contains the request structure for creating an email template.

*   `contentSpaceOrFolderId` (_string_, required) The ID of the content space or folder that contains the email template.  
    Example: `0Zuxx00000003M5CAI`.
*   `contentType` (_string_, required) The content type identifier for the email template.  
    Allowed values: `sfdc_cms__emailTemplate`. Example: `sfdc_cms__emailTemplate`.
*   `contentBody` (_EmailTemplateBody_, required)

### EmailTemplateResponse

A response structure that's returned when creating or retrieving email template content.

*   `apiName` (_string_) The system-generated API name for the email template.
*   `contentBody` (_EmailTemplateBody_) An object that contains the properties and structure of the email template.
*   `contentFqn` (_string_, nullable) The fully qualified name for the email template, including workspace and content type.
*   `contentKey` (_string_) The 28-character alphanumeric content key for the email template.
*   `contentSpace` (_object_) An object that describes the content space where the email template is stored.
    *   `id` (_string_) The unique identifier for the content space.
    *   `resourceUrl` (_string_) The API resource URL for the content space.
*   `contentType` (_object_) The content type information for the email template.
    *   `fullyQualifiedName` (_string_) The fully qualified name of the content type.
*   `createdBy` (_object_) An object that defines the user who created the email template.
    *   `id` (_string_) The unique identifier of the user who created the template.
    *   `name` (_string_) The display name of the user who created the template.
    *   `resourceUrl` (_string_) The API resource URL for the user.
*   `createdDate` (_string (date-time)_) The date and time when the email template was created.
*   `externalId` (_string_, nullable) The external identifier for the email template.
*   `folder` (_object_) An object that describes the folder where the email template is stored.
    *   `id` (_string_) The unique identifier for the folder.
    *   `resourceUrl` (_string_) The API resource URL for the folder.
*   `isPublished` (_boolean_) Indicates whether the email template is published.
*   `language` (_string_) The language code for the email template.
*   `lastModifiedBy` (_object_) An object that defines the user who last modified the email template.
    *   `id` (_string_) The unique identifier of the user who last modified the template.
    *   `name` (_string_) The display name of the user who last modified the template.
    *   `resourceUrl` (_string_) The API resource URL for the user.
*   `lastModifiedDate` (_string (date-time)_) The date and time when the email template was last modified.
*   `managedContentId` (_string_) The Salesforce record ID for the email template.
*   `managedContentVariantId` (_string_) The variant ID for this email template.
*   `managedContentVersionId` (_string_) The version ID of the email template.
*   `status` (_object_) An object that defines the publication status of the email template.
    *   `label` (_string_) The display label for the publication status.
    *   `status` (_string_) The publication status of the email template.  
        Allowed values: `Draft`, `Published`.
*   `title` (_string_) The display title of the email template.
*   `urlName` (_string_) The URL-friendly slug that is auto-generated from the title.
*   `versionNumber` (_string_) The version number of the email template.

### Error

*   `error` (_string_, required) The error code or type.  
    Example: `VALIDATION_ERROR`.
*   `message` (_string_, required) A human-readable error message.  
    Example: `Required field 'messagePurpose' is missing`.
*   `details` (_array of object_) Additional information about the error.
    *   `field` (_string_) The field that caused the error.
    *   `message` (_string_) The error message for the field.

### EmailTemplateBody

The content body for email template content type.

Email templates are reusable content structures based on the email content type. They support all email properties with additional template-specific features such as read-only schema sections and variants.

*   `sfdc_cms:title` (_string_, required) The title of the email template
*   `sfdc_cms:description` (_string_) Description of the email template  
    Maximum length: 255.
*   `messagePurpose` (_string_, required)
    
    The purpose classification of the email message.
    
    *   `promotional`: Marketing messages
    *   `transactional`: Service notifications, receipts, and similar messages
    
      
    Allowed values: `promotional`, `transactional`. Default: `promotional`.
*   `backgroundColor` (_string_) The background color for the email.
*   `lightning:colorScheme` (_string_) The color scheme reference. This value can be specified by the brand data provider.
*   `lightning:padding` (_string_) The padding value or a reference to the brand padding value.
*   `lightning:dataProviders` (_array of DataProvider_) The data provider configurations for dynamic content.
*   `sfdc_cms:block` (_RootBlock_) The root component block structure.
*   `sfdc_cms:schema` (_object_) The schema configuration.
    *   `readOnly` (_boolean_) Indicates whether to mark schema sections as read-only.

_Example_

```
{
  "sfdc_cms:title": "Welcome Email Template",
  "sfdc_cms:description": "Standard welcome email for new customers",
  "messagePurpose": "transactional",
  "backgroundColor": "#f3f3f3",
  "lightning:colorScheme": "{!$brand.colorScheme}",
  "lightning:padding": "{!$brand.spacing.none}",
  "sfdc_cms:block": {
    "type": "block",
    "definition": "sfdc_cms/rootContentBlock",
    "children": [
      {
        "type": "block",
        "definition": "lightning/section",
        "attributes": {
          "stackOnMobile": true
        },
        "children": [
          {
            "type": "block",
            "definition": "lightning/column",
            "attributes": {
              "columnWidth": 12
            },
            "children": [
              {
                "type": "block",
                "definition": "lightning/heading",
                "attributes": {
                  "level": 1,
                  "text": "Welcome to our service!"
                }
              }
            ]
          }
        ]
      }
    ]
  }
}
```

### DataProvider

A data provider configuration for dynamic content.

*   `sfdcExpressionKey` (_string_) The expression key for the data provider.  
    Example: `$brand`.
*   `definition` (_string_) The data provider definition.  
    Example: `sfdc_cms__brandDataProvider`.
*   `attributes` (_object_) The data provider attributes.

### RootBlock

The root content block for an email template.

*   `type` (_string_, required)  
    Allowed values: `block`.
*   `definition` (_string_, required)  
    Allowed values: `sfdc_cms/rootContentBlock`.
*   `children` (_array of Block_) The child blocks. These blocks can include sections, columns, and content blocks.

_Example_

```
{
  "type": "block",
  "definition": "sfdc_cms/rootContentBlock",
  "children": [
    {
      "type": "block",
      "definition": "lightning/section",
      "attributes": {
        "stackOnMobile": true,
        "lightning:colorScheme": "{!$brand.colorScheme}"
      },
      "children": [
        {
          "type": "block",
          "definition": "lightning/column",
          "attributes": {
            "columnWidth": 12
          },
          "children": [
            {
              "type": "block",
              "definition": "lightning/heading",
              "attributes": {
                "level": 1,
                "text": "Welcome to our service!"
              }
            }
          ]
        }
      ]
    }
  ]
}
```

### Block

A generic block structure for email content.

*   `type` (_string_, required)  
    Allowed values: `block`.
*   `definition` (_string_, required) The block type definition.
*   `attributes` (_object_) The attributes of the block.
*   `children` (_array of Block_) The children of the block.

_Example_

```
{
  "type": "block",
  "definition": "lightning/section",
  "attributes": {
    "stackOnMobile": true,
    "lightning:colorScheme": "{!$brand.colorScheme}",
    "lightning:padding": "{!$brand.spacing.xSmall}"
  },
  "children": [
    {
      "type": "block",
      "definition": "lightning/column",
      "attributes": {
        "columnWidth": 12
      },
      "children": [
        {
          "type": "block",
          "definition": "lightning/heading",
          "attributes": {
            "level": 1,
            "text": "Section Heading"
          }
        }
      ]
    }
  ]
}
```