CreateTemplate

Creates a template

This method can be used to create a new template within your account.

SOAP action: http://apiconnector.com/v2/ApiService/CreateTemplate

📘

Input and output parameters

The input and output parameters for this method are:

Input parameters

  • Template
    • Name - required; string
    • Subject - required; string
    • FromName - required; string
    • HtmlContent - required; string
    • PlainTextContent - required; string

Output parameters

  • CreateTemplateResult
    • Id - integer
    • Name - string
    • Subject - string
    • FromName - string
    • HtmlContent - string
    • PlainTextContent - string
    • ReplyAction - string (Unset', 'WebMailForward', 'Webmail', 'Delete')
    • ReplyToAddress - string

Example

using (var client = new ApiServiceClient())
{
	client.ClientCredentials.UserName.UserName = "username";
	client.ClientCredentials.UserName.Password = "password";

	var template = new ApiTemplate
	                {
	                    Name = "TestTemplate",
	                    FromName = "TestFromName",
	                    HtmlContent = "<h1>TestHtmlContent</h1>",
	                    PlainTextContent = "TestPlainTextContent",
	                    Subject = "TestSubject"
	                };
	var createdTemplate = client.CreateTemplate(template);
}