{
"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
},
"WHATSAPP": {
"channel": "WHATSAPP",
"type": "TEMPLATE",
"template": {
"name": "payment_request_template",
"language": {
"code": "EN"
},
"components": [
{
"type": "HEADER",
"parameters": [
{
"type": "DOCUMENT",
"document": {
"link": "{{doc}}",
"filename": "{{fileName}}"
},
"parameter_name": "document"
}
]
},
{
"type": "BODY",
"parameters": [
{
"text": "{{name}}",
"type": "TEXT",
"parameter_name": "1"
},
{
"text": "{{event}}",
"type": "TEXT",
"parameter_name": "2"
},
{
"text": "{{amount}}",
"type": "TEXT",
"parameter_name": "3"
}
]
},
{
"type": "BUTTON",
"index": 0,
"sub_type": "URL",
"parameters": [
{
"text": "https://www.mystore.com/",
"type": "text",
"parameter_name": "1"
}
]
}
]
}
},
"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
}
Create a new template with channel-specific configurations
{
"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
},
"WHATSAPP": {
"channel": "WHATSAPP",
"type": "TEMPLATE",
"template": {
"name": "payment_request_template",
"language": {
"code": "EN"
},
"components": [
{
"type": "HEADER",
"parameters": [
{
"type": "DOCUMENT",
"document": {
"link": "{{doc}}",
"filename": "{{fileName}}"
},
"parameter_name": "document"
}
]
},
{
"type": "BODY",
"parameters": [
{
"text": "{{name}}",
"type": "TEXT",
"parameter_name": "1"
},
{
"text": "{{event}}",
"type": "TEXT",
"parameter_name": "2"
},
{
"text": "{{amount}}",
"type": "TEXT",
"parameter_name": "3"
}
]
},
{
"type": "BUTTON",
"index": 0,
"sub_type": "URL",
"parameters": [
{
"text": "https://www.mystore.com/",
"type": "text",
"parameter_name": "1"
}
]
}
]
}
},
"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
}
Bearer {{apiToken}}{
"name": <template_name>,
"description": <description>,
"tagNames": [
<tagName>
],
"variables": [
{
"name": <variable_name>,
"defaultValue": <default_value>
}
],
"configurations": {
"SMS": {
"body": <body>,
"channel": "SMS",
"isFlash": <boolean_value>,
"isUnicode": <boolean_value>
},
"EMAIL": {
"subject": <subject>,
"channel": "EMAIL",
"body": <body>,
"attachments": [],
"isRawHTML": <boolean_value>,
"isPlainText": <boolean_value>
}
}
}
{
"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
},
"WHATSAPP": {
"channel": "WHATSAPP",
"type": "TEMPLATE",
"template": {
"name": "payment_request_template",
"language": {
"code": "EN"
},
"components": [
{
"type": "HEADER",
"parameters": [
{
"type": "DOCUMENT",
"document": {
"link": "{{doc}}",
"filename": "{{fileName}}"
},
"parameter_name": "document"
}
]
},
{
"type": "BODY",
"parameters": [
{
"text": "{{name}}",
"type": "TEXT",
"parameter_name": "1"
},
{
"text": "{{event}}",
"type": "TEXT",
"parameter_name": "2"
},
{
"text": "{{amount}}",
"type": "TEXT",
"parameter_name": "3"
}
]
},
{
"type": "BUTTON",
"index": 0,
"sub_type": "URL",
"parameters": [
{
"text": "https://www.mystore.com/",
"type": "text",
"parameter_name": "1"
}
]
}
]
}
},
"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
}
Was this page helpful?