createEmailTemplate method

It is a method to create an email template for a mass campaign. To edit an existing template, you can use the updateEmailTemplate method.

Principle of use

Syntax and URL to call the method
createEmailTemplate (string title, string subject, string body, string lang,
string text_body, string description)
https://api.selzy.com/en/api/createEmailTemplate?format=json&api_key=KEY&title=TITLE&subject=SUBJECT&body=
HTMLBODY&lang=FORMAT&text_body=TEXTBODY=RAW&description=DESCRIPTION
Arguments
api_key * API access key.
title * Template name.
subject * String with the letter subject. It may include substitution fields.
body * Text of the letter template in the HTML format with the possibility to add substitution fields. If you transfer the entire HTML text, test such letters additionally as headers outside the body may be modified. In addition, in order to reduce a difference in the display in various mail applications, we automatically add additional markup to each letter (a table with invisible borders, which also sets a default font and left alignment of the text). You may request to turn it off for your letters by contacting our technical support service.
description A text description of the template, which can be obtained later on when calling this template.
text_body Text version of the letter template.
lang Two-letter language code for the string with the unsubscribe link that is added to each letter automatically.

If it is not specified, the language code from the API URL is used.

In addition to the string with the unsubscribe link, this language also affects the interface of the unsubscribe page. Languages en, it, ua and ru are fully supported, and in case of some other languages (da, de, es, fr, nl, pl, pt, tr), the string with a link will be translated, and the control interface will be in English.

Return value
JSON object with the following fields:template_id — identifier of the created template;

warnings — array containing warning fields (if any).

Example of the return value in case the template has been created successfully:

{
  "result":{
    "template_id": 1234567890
  },
  "warnings":[
    {"warning":"some warning text, if applicable"}
  ]
}

On error:

{"error":"error message", "code":"error code"}
Did we answer your question?
1
1

To get more help, contact our Support Team. They are available for all Selzy users 24/7.