{
"name": "Sample_Template1",
"description": "sample template description",
"tagNames": [
"sample_tag_1",
"sample_tag_2"
],
"variables": [
{
"name": "var1",
"defaultValue": "var1 value"
}
],
"configurations": {
"SMS": {
"body": "sample message body",
"channel": "SMS",
"isFlash": false,
"isUnicode": false
},
"EMAIL": {
"subject": "test email subject",
"channel": "EMAIL",
"body": "<p>test body</p>",
"attachments": [],
"isRawHTML": false,
"isPlainText": false
}
}
}
{
"data": {
"templateId": "UUID", // Template ID
"templateName": "string", // Template name
"draftVersionId": "UUID", // Draft version ID
"channelTemplateList": [
{
"id": "UUID", // Channel template ID
"channel": "string", // Channel type
"configuration": {
"channel": "string" // Channel type
},
"templateVersionId": "UUID" // Template version ID
},
{
"id": "UUID",
"channel": "string",
"configuration": {
"channel": "string"
},
"templateVersionId": "UUID"
}
]
},
"error": null,
"errors": null,
"meta": null
}
{
"data": null,
"error": {
"errorCode": "BAD_REQUEST",
"message": "Bad request"
},
"errors": [
{
"errorCode": "BAD_REQUEST",
"message": "Bad request"
}
],
"meta": null
}
Template APIs
Update Template
Update an existing template with channel-specific configurations
PUT
/
api
/
v1
/
public
/
template
/
{template_id}
{
"name": "Sample_Template1",
"description": "sample template description",
"tagNames": [
"sample_tag_1",
"sample_tag_2"
],
"variables": [
{
"name": "var1",
"defaultValue": "var1 value"
}
],
"configurations": {
"SMS": {
"body": "sample message body",
"channel": "SMS",
"isFlash": false,
"isUnicode": false
},
"EMAIL": {
"subject": "test email subject",
"channel": "EMAIL",
"body": "<p>test body</p>",
"attachments": [],
"isRawHTML": false,
"isPlainText": false
}
}
}
{
"data": {
"templateId": "UUID", // Template ID
"templateName": "string", // Template name
"draftVersionId": "UUID", // Draft version ID
"channelTemplateList": [
{
"id": "UUID", // Channel template ID
"channel": "string", // Channel type
"configuration": {
"channel": "string" // Channel type
},
"templateVersionId": "UUID" // Template version ID
},
{
"id": "UUID",
"channel": "string",
"configuration": {
"channel": "string"
},
"templateVersionId": "UUID"
}
]
},
"error": null,
"errors": null,
"meta": null
}
{
"data": null,
"error": {
"errorCode": "BAD_REQUEST",
"message": "Bad request"
},
"errors": [
{
"errorCode": "BAD_REQUEST",
"message": "Bad request"
}
],
"meta": null
}
Header
string
required
Bearer token for API authentication. Format:
Bearer {{apiToken}}Query Parameters
UUID
required
The ID of the template to update.
Request Body
{
"name": <template_name>,
"description": <description>,
"tagNames": [
<tagName>
],
"variables": [
{
"name": <variable_name>,
"defaultValue": <default_value>
}
]
}
Body Parameters
string
required
Specifies the name of the template.
string
A brief description of the template.
array
A list of tag names associated with the template.
array
A list of variables used in the template.
object
required
Channel-specific configurations for the template.
{
"name": "Sample_Template1",
"description": "sample template description",
"tagNames": [
"sample_tag_1",
"sample_tag_2"
],
"variables": [
{
"name": "var1",
"defaultValue": "var1 value"
}
],
"configurations": {
"SMS": {
"body": "sample message body",
"channel": "SMS",
"isFlash": false,
"isUnicode": false
},
"EMAIL": {
"subject": "test email subject",
"channel": "EMAIL",
"body": "<p>test body</p>",
"attachments": [],
"isRawHTML": false,
"isPlainText": false
}
}
}
Response
object
{
"data": {
"templateId": "UUID", // Template ID
"templateName": "string", // Template name
"draftVersionId": "UUID", // Draft version ID
"channelTemplateList": [
{
"id": "UUID", // Channel template ID
"channel": "string", // Channel type
"configuration": {
"channel": "string" // Channel type
},
"templateVersionId": "UUID" // Template version ID
},
{
"id": "UUID",
"channel": "string",
"configuration": {
"channel": "string"
},
"templateVersionId": "UUID"
}
]
},
"error": null,
"errors": null,
"meta": null
}
{
"data": null,
"error": {
"errorCode": "BAD_REQUEST",
"message": "Bad request"
},
"errors": [
{
"errorCode": "BAD_REQUEST",
"message": "Bad request"
}
],
"meta": null
}
Status Codes
200- OK400- BAD REQUEST401- UNAUTHORISED404- NOT FOUND
Was this page helpful?