Skip to main content

Create Template (POST)

This method creates a Transactional Messaging Template.

This is a POST method.

REST WADL

https://atmp-pub-api-www3.actito.com/apitransactional/services/rest?_wadl&_type=xml

REST URL

https://atmp-pub-api-www3.actito.com/apitransactional/services/rest/template/create/{token}

| Input parameters
Required parameters | Description | Output parameters | Description | | ----------------------------------------------------------------------------- | ----------- | ----------------- | ----------- | | token | The connection token | return | The ID of the Template | | template | The Template object | | | | name | The name of the Template. Note that the template name value is only visible in your ATMP interface and recipients cannot see it. | | | | description | The description of the Template. Note that the description value is only visible in your ATMP interface and recipients cannot see it. | | | | subject | The subject of the Template | | | | from | The From display name value. | | | | fromEmail | The From email sender address.
Note: If you provide an email sender address that has not been validated for your ATMP license, it will be replaced by the default email sender address from your license automatically. | | | | to | The To display name value. | | | | encoding | The encoding used (e.g. UTF-8) | | | | replyTo | The Reply To display name value. | | | | replyToEmail | The Reply To email address. | | | | type | The type of Template:

  • TRANSACTIONAL
  • SOCIALNETWORK (this value is deprecated)
| | |

Error messages

  • You must fill in the token parameter
  • You must fill in the name parameter.
  • You must fill in the description parameter.
  • You must fill in the subject parameter.
  • You must fill in the from parameter.
  • You must fill in the fromEmail parameter.
  • You must fill in the to parameter.
  • You must fill in the encoding parameter.
  • You must fill in the replyTo parameter.
  • You must fill in the replyToEmail parameter.
  • You must fill in the type parameter.
  • Error while retrieving the default sender on your account.
  • This sender is not configured for your account.
  • Template type not supported.
  • An error occured on the server

REST Example

Input

URL

https://atmp-pub-api-www3.actito.com/apitransactional/services/rest/template/create/{token}

Content-type

content-type application/x-www-form-urlencoded

Body

<?xml version="1.0" encoding="UTF-8"?>
<template>
<token>{{connection token}}</token>
<name>Create Template POST test - buxtd</name>
<description>none</description>
<subject>Transactional message created by API</subject>
<from>My From Display Name</from>
<fromEmail>Default</fromEmail>
<to>Dear Customer</to>
<encoding>UTF-8</encoding>
<body>[EMV TEXTPART] This is the textpart. Below is the HTMLpart.
<![CDATA[
[EMV HTMLPART]
<html>
<body>
Hello, click the following link please: <a href="http://www.example.com">link1</a>.<br />
Have a nice day.
</body>
</html>
]]>
</body>
<replyTo>My ReplyTo Display Name</replyTo>
<replyToEmail>noreply@example.com</replyToEmail>
<type>TRANSACTIONAL</type>
</template>

Output

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<response responseStatus="success">
<result xsi:type="xs:boolean"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">true
</result>
</response>