Create a new email template

Use POST {URI}/emailTemplates to create email templates for reward delivery. The ETID returned in the API response is necessary to identify a particular email template when ordering.

EndpointPurpose
POST {URI}/emailTemplatesCreate a new email template.

Here is the list of body parameters for when you use POST {URI}/emailTemplates to create a new email template:

ParameterData typeDescription
namestringA unique name to give the template.
fromNamestringThe name that appears in the From line of the email.
subjectstringThe Subject of the email.
headerImagestringA Base64 encoded string of an image that shows as the header of the email.
headerImageAltTextstringThe Alt Text for the Header Image in the email.
accentColorstringA Hex color value, six hexadecimal digits preceded by a pound sign, used as an accent in the email.
messageBodystringThe message body for the email. This is often used to let the recipient know why they have received the reward.
closingstringAfter the reward credential, a space to close the message to the recipient.
customerServiceMessagestring(Optional) If left null, Tango's Customer Support contact information is included. Otherwise contact information for your customer support, if you are taking responsibility for providing first tier customer support of your recipients.
accessControlarray of objects(Optional) Indicates which Customers and/or Accounts should have access to this template.
-typestringThe type of access being specified: PLATFORM, CUSTOMER or ACCOUNT.
-identifierstringLeave this field blank if the type is PLATFORM. Enter either customerIdentifier or accountIdentifier (5-100 chars), if the type is CUSTOMER OR ACCOUNT, respectively.
defaultsarray of objectsIf you want this template to be used at order time for the given Platform, Customer or Account when the Email Template Identifier (etid) is not provided with the order.
-typestringThe type of default being specified: PLATFORM, CUSTOMER or ACCOUNT.
-identifierstringLeave this field blank if the type is PLATFORM. Enter either customerIdentifier or accountIdentifier (5-100 chars), if the type is CUSTOMER OR ACCOUNT, respectively.

See the payload example below:

{
  "etid": "string",
  "name": "string",
  "fromName": "string",
  "subject": "string",
  "headerImage": "string",
  "headerImageAltText": "string",
  "accentColor": "string",
  "messageBody": "string",
  "closing": "string",
  "customerServiceMessage": "string",
  "accessControls": [
    {
      "type": "PLATFORM",
      "identifier": "string"
    }
  ],
  "defaults": [
    {
      "type": "PLATFORM",
      "identifier": "string"
    }
  ]
}

The response message for this endpoint is:

  • 201 Created
  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found
  • 409 Conflict, Duplicate Exists
  • 422 Unprocessable Entity

Rewards as a Service™ and the RaaS® API are provided by Tango Card, Inc. © 2024 Tango Card, Inc.