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.

OperationHTTP VerbURL FormatAbility Requirements
CreatePOSThttps://pi.pardot.com/api/v5/objects/email-templates?<params>Marketing > Emails > Email Templates > Create ability
ReadGEThttps://pi.pardot.com/api/v5/objects/email-templates/<id>?<params>Marketing > Emails > Email Templates > View ability
UpdatePATCHhttps://pi.pardot.com/api/v5/objects/email-templates/<id>?<params>Marketing > Emails > Email Templates > Create ability
DeleteDELETEhttps://pi.pardot.com/api/v5/objects/email-templates/<id>Marketing > Emails > Email Templates > Delete ability
QueryGEThttps://pi.pardot.com/api/v5/objects/email-templates?<params>Marketing > Emails > Email Templates > View ability
Add TagPOSThttps://pi.pardot.com/api/v5/objects/email-templates/<id>/do/addTagMarketing > Emails > Email Templates > Create AND Marketing > Segmentation > Tags > Create ability
Remove TagPOSThttps://pi.pardot.com/api/v5/objects/email-templates/<id>/do/removeTagMarketing > Emails > Email Templates > Create AND Marketing > Segmentation > Tags > Create ability
FieldTypeDescription
nameStringName of the email template.
subjectStringSubject line for the email template.
isOneToOneEmailBooleanIf True, the template is available for one-to-one emails.
isAutoResponderEmailBooleanIf True, the template is available for autoresponder emails.
isDripEmailBooleanIf True, the template is available for Engagement Programs.
isListEmailBooleanIf True, the template is available for list emails.
textMessageStringThe text content of the template's message. This field isn’t queryable.
htmlMessageStringThe HTML content of the template's message. This field isn’t queryable.
senderOptionsSender 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)
trackerDomainIdIntegerThe ID of the tracker domain associated with this object.
folderIdIntegerID of the folder containing this object.
typeEnumThe content type of the email. Possible values are html (Read and Query only), text, and htmlAndText.
campaignIdIntegerThe ID of the campaign associated with this object.
FieldTypeDescription
replyToOptionsReply 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)
FieldTypeDescription
idIntegerID of the email template.
isDeletedBooleanTrue if the object is in the recycle bin in Account Engagement.
createdAtDatetimeTime the email template was created; reported in API user's timezone.
updatedAtDatetimeTime the email template last updated; reported in API user's timezone.
createdByIdIntegerID of the user who created this object.
updatedByIdIntegerID of the user who last updated this object.
createdByUserUser object representing the user who created this object. See documentation for User for fields.
updatedByUserUser object representing the user who last updated this object. See documentation for User for fields.
campaignCampaignCampaign object representing the campaign that was set on Create. See documentation for Campaign for fields.
folderFolderJSON object representing the folder for this object. See documentation for Folder for fields.
trackerDomainTracker DomainTracker Domain object representing the tracker domain associated with the email template. See documentation for Tracker Domain for fields.
tagReplacementLanguageEnumMerge language of the email template. Can be "pml", "hml", or "undetermined".
Field NameData TypeDescription
senderOptions.typeEnumThe 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.addressStringThe sending email address.
senderOptions.nameStringThe name of the sender.
senderOptions.userIdIntegerThe user ID of the sender.
senderOptions.prospectCustomFieldIdIntegerThe ID of the prospect custom field that contains the sender value. Only available on read and query.
senderOptions.accountCustomFieldIdIntegerThe ID of the account custom field that contains the sender value. Only available on read and query.
Field NameData TypeDescription
replyToOptions.typeEnumThe 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.addressStringThe reply-to email address.
replyToOptions.userIdIntegerThe user ID of the reply to sender.
replyToOptions.prospectCustomFieldIdIntegerThe ID of the prospect custom field that contains the reply to value.
replyToOptions.accountCustomFieldIdIntegerThe 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.

ParameterDescription
idID of the email template.
createdAtTime the email template was created; reported in API user's timezone.
updatedAtTime 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.

ParameterDescription
idReturns any email templates where ID is equal to the given integer value.
idListReturns any email templates where ID is included in the given list of values.
idGreaterThanReturns any email templates where ID is greater than the specified value, non-inclusive.
idGreaterThanOrEqualToReturns any email templates where ID is greater than or equal to the specified value.
idLessThanReturns any email templates where ID is less than the specified value, non-inclusive.
idLessThanOrEqualToReturns any email templates where ID is less than or equal to the specified value.
nameReturns any email templates where Name is equal to the given string value.
createdAtReturns any email templates where CreatedAt is equal to the given datetime value.
createdAtAfterReturns any email templates where CreatedAt is after the given datetime value, non-inclusive.
createdAtAfterOrEqualToReturns any email templates where CreatedAt is after or equal to the given datetime value.
createdAtBeforeReturns any email templates where CreatedAt is before the given datetime value, non-inclusive.
createdAtBeforeOrEqualToReturns any email templates where CreatedAt is before or equal to the given datetime value.
updatedAtReturns any email templates where UpdatedAt is equal to the given datetime value.
updatedAtAfterReturns any email templates where UpdatedAt is after the given datetime value, non-inclusive.
updatedAtAfterOrEqualToReturns any email templates where UpdatedAt is after or equal to the given datetime value.
updatedAtBeforeReturns any email templates where UpdatedAt is before the given datetime value, non-inclusive.
updatedAtBeforeOrEqualToReturns any email templates where UpdatedAt is before or equal to the given datetime value.
deletedDetermines whether to return deleted records. The value can be false (default), true, or all.
isOneToOneIf 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.