The ListTemplates method lists all the templates within the your dotMailer account.
This method will return up to 1000 templates in one go. You should use the select and skip parameters to iterate through the whole data set.
Parameters
| username |
string |
This is the username from your API key. It is in the format of an email address and will look similar to apiuser‑908709770324@apiconnector.com |
required |
| password |
string |
This is the password from your API key. |
required |
| select |
int |
This is a number which indicates the number of records you wish to select. This argument must no greater than 1000. |
required |
| skip |
int |
This is a number which is the number of records you want to skip; to select all records from 1001 to 2000: set this number to 1000. |
required |
Return values
The result is an array of APITemplate objects, each consisting of the following:
| fromName |
string |
The name the email will be set to be from. |
| htmlContent |
string |
The contents of the HTML template. |
| id |
int |
The template ID. |
| name |
string |
The name of the template. |
| plaintextContent |
string |
The contents of the Plain Text version of the template. |
| replyAction |
|
Unset or WebMailForward or Webmail or Delete. |
| replyToAddress |
|
The email address replies should be forwarded to. |
| status |
|
NotSet or Unsent or Sending or Sent or Paused or Cancelled or RequiresApproval or Requires SMSApproval or Triggered. |
| subject |
string |
The subject line of the email. |