post

/templates

What is Template?

A template is a named collection of HTML content stored on the server side. Templates are used in an email sending API by providing the template id of the template at the time of email sending request. The text inside the template is run through the substitution engine to produce recipient specific email messages by replacing the attribute placeholders with its respective value.

Note: Templates created on a parent/master account will not be accessible from the sub accounts.

This API endpoint enables you to add new email templates.

Request Parameters

1 Header

Request Body

1 Example
Schema
object
content: adsadasdas
domainName: test.in
templateName: test
content
string

The HTML content which you would like to save as template. You can use attributes to display dynamic values such as name, account number, etc. for ex. [% NAME %] for NAME , [% AGE %] for AGE etc. It is recommended to pass the HTML content in the API as “URL encoded” to avoid any type of content distortion during the transmission/delivery of emails.

templateName
string

The name of the new template.

required
maxLength: 255
pattern: ^[a-z0-9A-Z_]{1,255}$

Responses

1 Example
Schema
object
data
object
templateId
string
templateName
string
message
string

Send a Test Request

Send requests directly from the browser (CORS must be enabled)
$$.env
No $$.env variables are being used in this request.