Get a list of all digital templates on this platform
You can retrieve a list of all digital templates available on your platform. These templates are used to customize the messaging and branding of digital rewards sent to recipients. Digital templates support both text messaging and email formats.
Use case
The marketing team at Acme Health has started a healthy lifestyle campaign. To encourage patients to adopt healthier lifestyles, the team sends digital rewards to the participants who complete the task. Marketing reviews all existing digital templates on the platform to select one that fits the campaign's tone. They also review the templates for consistency and branding.
Note:
Digital templates support both text messages and emails. Email will continue to be the default mode of delivery.
Use the following endpoint to get a list of all digital templates created in your platform:
Endpoint | Purpose |
---|---|
GET {URI}/digtaTemplates | Get a list of all digital templates on this platform including email and text messaging. |
The following query parameters specify the format of data when you get a list of all digital templates on this Platform. The response is paginated and defaults to the first page. The default is 25 templates per page if no page number is specified:
Query params | Data type | Description |
---|---|---|
elementsPerBlock | int32 | specify the number of elements in a block. |
page | int32 | specify the page number to return. |
See the payload example below for this endpoint. The default number of templates are shown here:
{
"page": {
"number": 0,
"elementsPerBlock": 0,
"resultCount": 0,
"totalCount": 0
},
"emailTemplates": [
{
"etid": "string",
"name": "string",
"fromName": "string",
"subject": "string",
"headerImage": "string",
"headerImageAltText": "string",
"accentColor": "string",
"messageBody": "string",
"smsMessageBody": "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 as follows. For details, see i18nkey codes and their error messages:
Response | Description |
---|---|
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. |
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 3 days ago