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 | Emails > Email Templates > Create ability |
Read | GET | https://pi.pardot.com/api/v5/objects/email-templates/<id>?<params> | Emails > Email Templates > View ability |
Update | PATCH | https://pi.pardot.com/api/v5/objects/email-templates/<id>?<params> | Emails > Email Templates > Create ability |
Delete | DELETE | https://pi.pardot.com/api/v5/objects/email-templates/<id> | Emails > Email Templates > Delete ability |
Query | GET | https://pi.pardot.com/api/v5/objects/email-templates?<params> | Emails > Email Templates > View 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 | Int | The ID of the tracker domain associated with this object. |
folderId | Int | ID of the folder containing this object. |
type | Enum | "html", "text", and "htmlAndText" values. |
campaignId | Int | 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 | Int | 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 | Int | ID of the user who created this object. |
updatedById | Int | 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 |
---|---|---|
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. |
address | String | The sending email address. |
name | String | The name of the sender. |
userId | Int | The user ID of the sender. |
prospectCustomFieldId | Int | The ID of the prospect custom field that contains the sender value. Only available on read and query. |
accountCustomFieldId | Int | 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 user" , "specific user" , "assigned_user" , "account_owner" , account_custom_field , or prospect_custom_field . |
replyToOptions.address | String | The repy to email address. |
replyToOptions.name | String | The name of the reply to sender. |
replyToOptions.userId | Int | The user ID of the reply to sender. |
replyToOptions.prospectCustomFieldId | Int | The ID of the prospect custom field that contains the reply to value. |
replyToOptions.accountCustomFieldId | Int | 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.
Example Request
Example Response
Responds with code 201 created
and returns any fields 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.
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. |