Update details for a specific email template

Use the following endpoint to update details for a specific email template on this platform. Only include elements that need to be updated.

EndpointPurpose
PATCH {URI}/emailTemplates/{etid}Update details for a specific email template on this platform.

The following table shows parameters for PATCH {URI}/emailTemplates/{etid}.

Path ParamsData typeDescription
etidstring(Required) Email Template Identifier (ETID) is returned in the email template response payload. (Path Parameter).
Body ParamsData typeDescription
namestring(Optional) A unique name to give the template.
fromNamestring(Optional) The name that will appear in the From line of the email.
subjectstring(Optional) The Subject of the email.
headerImagestring(Optional) A Base64 encoded string of an image that will show as the header of the email.
headerImageAltTextstring(Optional) The Alt Text for the Header Image in the email.
accentColorstring(Optional) A Hex color value, six hexadecimal digits preceded by a pound sign, used as an accent in the email.
messageBodystring(Optional) The message body for the email. This is often used to let the recipient know why they have received the reward. The string may have up to 1024 characters.
closingstring(Optional) After the reward credential, a space to close the message to the recipient.
customerServiceMessagestring(Optional) If left null, Tango's Customer Support contact information will be 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) 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 the the customerIdentifier or the accountIdentifier if the type is CUSTOMER OR ACCOUNT, respectively.
defaultsarray of objects(Optional) If 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 the the customerIdentifier or the accountIdentifier if the type is CUSTOMER OR ACCOUNT, respectively.

See the example payload 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"
    }
  ]
}

Here's an example payload for when you receive an error:

{
  "timestamp": "2025-02-21T23:23:13.930Z",
  "requestId": "string",
  "path": "string",
  "httpCode": 0,
  "httpPhrase": "string",
  "i18nKey": "string",
  "message": "The error message will show here for error codes ",
  "errors": [
    {}
  ]
}

The possible response codes for this endpoint are:

  • 200 Ok
  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found
  • 409 Conflict, Duplicate Exists

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