Email Template Object

Use an email template to design a reusable email layout for your engagement programs, autoresponders, one-to-one emails, and list emails. Learn about email templates in Salesforce Help.

Include the authentication header with every request. For information on how to authenticate, see Authentication.

Note

Email Template Resources 

Resource NameOperationDescription
Email Template ReadGETRequest information about a single email template.
One-to-One Email TemplatesGETRequest information about the email templates that are used in one-to-one emails.

Email Template Read 

Request information about a single email template.

URI 

1/api/emailTemplate/version/4/do/read/id/<ID>

Replace <ID> with the Account Engagement ID of the email template.

Parameters to Select a Template 

Use this parameter to specify the email templates to return.

ParameterTypePossible ValuesDescription
archivedbooleantrue, falseIf true, the request returns archived and unarchived templates. If false, only unarchived templates are returned. Default value is false.

One-to-One Email Templates 

Request the email templates that are enabled for one-to-one emails.

URI 

1/api/emailTemplate/version/4/do/listOneToOne

Parameters to Select One-to-One Email Templates 

Use this parameter to specify which one-to-one email templates to return.

ParameterTypePossible ValuesDescription
archivedbooleantrue, falseIf true, the request returns both archived and unarchived templates. If false, only unarchived templates are returned. Default is false.

XML Response 

Use the XML response for read requests and one-to-one requests to learn more about your email templates.

XML Response for an Email Template Read 

1<rsp stat="ok" version="1.0">
2    <emailTemplate>
3        <error></error>
4        <errorCode></errorCode>
5        <errorMessage></errorMessage>
6    </emailTemplate>
7    --- or ---
8    <emailTemplate>
9        <error></error>
10        <sendOptions>
11            <replyToAddress></replyToAddress>
12            <sendFromData></sendFromData>
13        </sendOptions>
14        <id></id>
15        <name></name>
16        <htmlMessage></htmlMessage>
17        <textMessage></textMessage>
18        <isDripEmail></isDripEmail>
19        <isListEmail></isListEmail>
20        <subject></subject>
21    </emailTemplate>
22</rsp>
TagDescription
<emailTemplate>Parent tag. Contains data fields for a single email template.
<error>Flag if an error occurred.
<errorCode>Code for the error which occurred.
<errorMessage>Description of the error.
<sendOptions>The associated send options object, including sender-specific data.
<replyToAddress>The email address in the email’s Reply-To header.
<sendFromData>A JSON array representing the sender hierarchy tied to the email template.
<id>The Account Engagement ID of the email template.
<name>The name of the email template.
<htmlMessage>The HTML version of the email template body.
<textMessage>The plain text version of the email template body.
<isDripEmail>Flag if the template is available for use in engagement programs.
<isListEmail>Flag if the template is available for use in list emails.
<subject>The subject of the email message.

XML Response for One-to-One Email Templates 

1<rsp stat="ok" version="1.0">
2    <emailTemplates>
3        <templates>
4            <id></id>
5            <name></name>
6            <isOneToOneEmail>1</isOneToOneEmail>
7            <isArchived></isArchived>
8            <isAutoResponderEmail></isAutoResponderEmail>
9            <isDripEmail></isDripEmail>
10            <isListEmail></isListEmail>
11            <subject></subject>
12        </templates>
13        <templates>...</templates>
14        <templates>...</templates>
15    </emailTemplates>
16</rsp>
TagDescription
<emailTemplates>Parent tag. Contains individual email template records.
<templates>Parent tag for each template.
<id>The Account Engagement ID of the email template.
<name>The name of the email template.
<isOneToOneEmail>Flag if the email template is available for use in one-to-one emails (always true).
<isArchived>Flag if the email template is in the Recycle Bin in Account Engagement.
<isAutoResponderEmail>Flag if the email template is available for use as an auto response from a form submission.
<isDripEmail>Flag if the email template is available for use in engagement programs.
<isListEmail>Flag if the email template is available for use in list emails.
<subject>The subject of the email message.