Update details for a specific email template
Use the following endpoint to update details for a specific email template identified by its unique ID (etid), without replacing the entire resource. For example, a content manager wants to update the subject line and body of an existing email template used for onboarding new users, while keeping other fields (like createdBy or createdAt) unchanged.
Note:(🚧 Coming soon) Email templates will soon be replaced by digital templates in Tango API. Digital templates support both text messaging and email formats. Email will continue to be the default mode of delivery.
Use the following endpoint to update the details of a specific email template:
Endpoint | Purpose |
---|---|
PATCH {URI}/emailTemplates/{etid} (deprecating soon) | Update details for a specific email template on this platform. |
PATCH {URI}/digitalTemplates/{etid} (coming soon) | Update details for a specific digital template on this platform including email and text messaging. |
The following table shows parameters for PATCH {URI}/emailTemplates/{etid}
.
Path Params | Data type | Description |
---|---|---|
etid | string | (Required) Email Template Identifier (ETID) is returned in the email template response payload. (Path Parameter). |
Body Params | Data type | Requirement | Description |
---|---|---|---|
name | string | optional | A unique name to give the template. |
fromName | string | optional | The name that will appear in the From line of the email. |
subject | string | optional | The Subject of the email. |
headerImage | string | optional | A Base64 encoded string of an image that will show as the header of the email. |
headerImageAltText | string | optional | The Alt Text for the Header Image in the email. |
accentColor | string | optional | A Hex color value, six hexadecimal digits preceded by a pound sign, used as an accent in the email. |
messageBody | string | 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. |
🚧 Coming soon | string | optional | The message body for the SMS. This is often used to let the recipient know why they have received the reward. Must be non-NULL when sending rewards via SMS. (limited to 90 characters) |
closing | string | optional | After the reward credential, a space to close the message to the recipient. |
customerServiceMessage | string | 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. |
accessControl | array of objects | optional | Which Customers and/or Accounts should have access to this template. |
-type | string | optional | The type of access being specified: PLATFORM, CUSTOMER or ACCOUNT. |
-identifier | string | optional | Leave this field blank if the type is PLATFORM. Enter either the the customerIdentifier or the accountIdentifier if the type is CUSTOMER OR ACCOUNT, respectively. |
defaults | array of objects | optional | (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. |
-type | string | optional | The type of default being specified: PLATFORM, CUSTOMER or ACCOUNT. |
-identifier | string | optional | Leave 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",
"smsMessageBody": "string", **🚧 Coming soon**
"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 as follows. For details, see i18nkey codes and their error messages:
Response code | Meaning |
---|---|
200 | The request was successful. |
400 | The server could not understand the request due to invalid syntax. |
401 | Authentication is required and has either not been provided or failed. |
403 | The server understood the request but refuses to authorize it. |
404 | The server could not find the requested resource. In other words, the URL you’re trying to access doesn’t point to anything that exists on the server. |
409 | The server understands the request but cannot process it due to semantic errors. |
500 | Something went wrong on the server, but the server cannot be more specific about what the exact problem is. |
503 | The server is currently unable to handle the request due to temporary overload or maintenance. |
Updated 15 days ago