AddEmailTemplate

Overview

Adds a new “Email Template” to settings based on information sent via an http form post.

( Adds the Flag to Settings > Email Settings > Templates )

Post Url

https://hyperdrivepro.morethanrewards.com/api/2/AddEmailTemplate.aspx

- SSL is required

Form Fields

FieldMax Length*RequiredNotes
response_type
YesSet this field value to json to return results in JSON format
accountid
YesMust be numeric. Account ID for this account.
apikey
YesAPI Key for this account. 
name50YesDisplay name for the Email Template
subjectline75YesEmail Subject Line
messagebody
YesEmail Message Body – HTML, Encoded

* You must HTML Encode / Output Escape your HTML, otherwise you will receive a server security error.

** This error will not be in the normal XML format, so be sure you look for a success message to confirm that your content was added

*** Do not include <HTML> or <HEAD> or <BODY> tags in your Email Templates.

Sample Results

Success Message

<?xml version="1.0"?> 
<results>
     <message>Success</message>
     <emailtemplateid>15631</emailtemplateid> 
</results>

Sample Failure Message

<?xml version="1.0"?> 
<results>
     <error>Authentication failed</error> 
</results> 

<?xml version="1.0"?>  
<results>
      <error>Email Template with this 'name' already exists</error>  
</results>