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.
The API to access the email template object follows the conventions described in Version 5 Overview.
Operation | HTTP Verb | URL Format | Ability Requirements |
---|---|---|---|
Create | POST | https://pi.pardot.com/api/v5/objects/email-templates?<params> | Marketing > Emails > Email Templates > Create ability |
Read | GET | https://pi.pardot.com/api/v5/objects/email-templates/<id>?<params> | Marketing > Emails > Email Templates > View ability |
Update | PATCH | https://pi.pardot.com/api/v5/objects/email-templates/<id>?<params> | Marketing > Emails > Email Templates > Create ability |
Delete | DELETE | https://pi.pardot.com/api/v5/objects/email-templates/<id> | Marketing > Emails > Email Templates > Delete ability |
Query | GET | https://pi.pardot.com/api/v5/objects/email-templates?<params> | Marketing > Emails > Email Templates > View ability |
Add Tag | POST | https://pi.pardot.com/api/v5/objects/email-templates/<id>/do/addTag | Marketing > Emails > Email Templates > Create AND Marketing > Segmentation > Tags > Create ability |
Remove Tag | POST | https://pi.pardot.com/api/v5/objects/email-templates/<id>/do/removeTag | Marketing > Emails > Email Templates > Create AND Marketing > Segmentation > Tags > Create ability |
Field | Type | Description |
---|---|---|
name | String | Name of the email template. |
subject | String | Subject line for the email template. |
isOneToOneEmail | Boolean | If True, the template is available for one-to-one emails. |
isAutoResponderEmail | Boolean | If True, the template is available for autoresponder emails. |
isDripEmail | Boolean | If True, the template is available for Engagement Programs. |
isListEmail | Boolean | If True, the template is available for list emails. |
textMessage | String | The text content of the template's message. This field isn’t queryable. |
htmlMessage | String | The HTML content of the template's message. This field isn’t queryable. |
senderOptions | Sender Options[] | An array of sender options. Values are general_user , specific_user , account_owner , prospect_custom_field (Read and Query only), account_custom_field (Read and Query only) |
trackerDomainId | Integer | The ID of the tracker domain associated with this object. |
folderId | Integer | ID of the folder containing this object. |
type | Enum | The content type of the email. Possible values are html (Read and Query only), text , and htmlAndText . |
campaignId | Integer | The ID of the campaign associated with this object. |
Field | Type | Description |
---|---|---|
replyToOptions | Reply To Options[] | An array of reply to address options. Values are general_address , specific_user , account_owner , prospect_custom_field (Read and Query only), account_custom_field (Read and Query only) |
Field | Type | Description |
---|---|---|
id | Integer | ID of the email template. |
isDeleted | Boolean | True if the object is in the recycle bin in Account Engagement. |
createdAt | Datetime | Time the email template was created; reported in API user's timezone. |
updatedAt | Datetime | Time the email template last updated; reported in API user's timezone. |
createdById | Integer | ID of the user who created this object. |
updatedById | Integer | ID of the user who last updated this object. |
createdBy | User | User object representing the user who created this object. See documentation for User for fields. |
updatedBy | User | User object representing the user who last updated this object. See documentation for User for fields. |
campaign | Campaign | Campaign object representing the campaign that was set on Create. See documentation for Campaign for fields. |
folder | Folder | JSON object representing the folder for this object. See documentation for Folder for fields. |
trackerDomain | Tracker Domain | Tracker Domain object representing the tracker domain associated with the email template. See documentation for Tracker Domain for fields. |
tagReplacementLanguage | Enum | Merge language of the email template. Can be "pml" , "hml" , or "undetermined" . |
Field Name | Data Type | Description |
---|---|---|
senderOptions.type | Enum | The sending user type. Can be general_user , specific_user , assigned_user or account_owner . When performing read or query, account_custom_field and prospect_custom_field are also available. |
senderOptions.address | String | The sending email address. |
senderOptions.name | String | The name of the sender. |
senderOptions.userId | Integer | The user ID of the sender. |
senderOptions.prospectCustomFieldId | Integer | The ID of the prospect custom field that contains the sender value. Only available on read and query. |
senderOptions.accountCustomFieldId | Integer | The ID of the account custom field that contains the sender value. Only available on read and query. |
Field Name | Data Type | Description |
---|---|---|
replyToOptions.type | Enum | The reply to user type. Can be general_address , specific_user , assigned_user or account_owner . When performing read or query, account_custom_field and prospect_custom_field are also available. |
replyToOptions.address | String | The reply-to email address. |
replyToOptions.userId | Integer | The user ID of the reply to sender. |
replyToOptions.prospectCustomFieldId | Integer | The ID of the prospect custom field that contains the reply to value. |
replyToOptions.accountCustomFieldId | Integer | The ID of the account custom field that contains the reply to value. |
Create a single email template following the conventions described in the Version 5 Overview.
When the Create request succeeds, the email template is considered Published and skips the Draft state.
Example Request
A successful request returns an HTTP 201 response. The response lists the fields that were specified in the request.
Retrieve a single email template following the conventions described in the Version 5 Overview.
Example Request
Example Response
Updates an email template following the conventions described in the Version 5 Overview.
After the Update request succeeds, the email template is considered Published and skips the Draft state.
Example Request
Example Response
Responds with 200 OK
and returns any fields specified in the request.
Deletes an email template following the conventions described in the Version 5 Overview.
Example Request
Example Response
Returns code 204 no content
.
Retrieve a collection of email templates following the conventions described in the Version 5 Overview.
Example Request
Example Response
When executing a query, the following fields can be specified in the orderBy
parameter. See the conventions for query described in the Version 5 Overview.
Parameter | Description |
---|---|
id | ID of the email template. |
createdAt | Time the email template was created; reported in API user's timezone. |
updatedAt | Time the email template last updated; reported in API user's timezone. |
When executing a query, the following parameters can be used to filter the returned results. These parameters can be specified in the request along with any shared parameters defined in Version 5 Overview. When specifying more than one parameter, all parameters must match the record in order for it to be returned in the results.
Parameter | Description |
---|---|
id | Returns any email templates where ID is equal to the given integer value. |
idList | Returns any email templates where ID is included in the given list of values. |
idGreaterThan | Returns any email templates where ID is greater than the specified value, non-inclusive. |
idGreaterThanOrEqualTo | Returns any email templates where ID is greater than or equal to the specified value. |
idLessThan | Returns any email templates where ID is less than the specified value, non-inclusive. |
idLessThanOrEqualTo | Returns any email templates where ID is less than or equal to the specified value. |
name | Returns any email templates where Name is equal to the given string value. |
createdAt | Returns any email templates where CreatedAt is equal to the given datetime value. |
createdAtAfter | Returns any email templates where CreatedAt is after the given datetime value, non-inclusive. |
createdAtAfterOrEqualTo | Returns any email templates where CreatedAt is after or equal to the given datetime value. |
createdAtBefore | Returns any email templates where CreatedAt is before the given datetime value, non-inclusive. |
createdAtBeforeOrEqualTo | Returns any email templates where CreatedAt is before or equal to the given datetime value. |
updatedAt | Returns any email templates where UpdatedAt is equal to the given datetime value. |
updatedAtAfter | Returns any email templates where UpdatedAt is after the given datetime value, non-inclusive. |
updatedAtAfterOrEqualTo | Returns any email templates where UpdatedAt is after or equal to the given datetime value. |
updatedAtBefore | Returns any email templates where UpdatedAt is before the given datetime value, non-inclusive. |
updatedAtBeforeOrEqualTo | Returns any email templates where UpdatedAt is before or equal to the given datetime value. |
deleted | Determines whether to return deleted records. The value can be false (default), true , or all . |
isOneToOne | If True, the template is available for one-to-one emails. |
Adds a Tag to the Email Template object, which creates a TaggedObject.
Example Request
Example Response
Remove a tag from an Email Template object. When you remove a tag, the associated TaggedObject record is deleted.
Example Request
Example Response
Returns code 204 no content
.