POST
/
api
/
v1
/
public
/
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
    }
  }
}

{
  "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
}
Authorization
string
required
Bearer token for API authentication. Format: Bearer {{apiToken}}
Request Body
{
   "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>
     }
   }
}

Body Parameters

name
string
required
Specifies the name of the template.
description
string
A brief description of the template.
tagNames
array
A list of tag names associated with the template.
variables
array
A list of variables used in the template.
configurations
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

data
object
templateId
UUID
Template ID.
templateName
string
Template name.
draftVersionId
UUID
Draft version ID.
channelTemplateList
array
List of channel-specific template metadata.
id
UUID
Channel template ID.
channel
string
Channel name (e.g., "SMS", "EMAIL").
configuration
object
Embedded configuration object.
channel
string
Channel name.
templateVersionId
UUID
Template version ID.
error
object
errorCode
string
The error code (e.g., BAD_REQUEST).
message
string
A human-readable error message.

{
  "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
}