Skip to content

Create footer

Footers collection allows creating new footers. Created footers can then be used in any email messages.

Request data format

Data part of request for creating a new footer.

Data element children:

Element/attributeTypeNotes
NamestringName of footer. Required.
HtmlstringHTML content of footer. The data should be enclosed in CDATA section for XML transport. See examples. Required.
PlainstringPlain text content of footer. Required.
AmpHtmlstringAMP HTML content of footer. The data should be enclosed in CDATA section for XML transport. See examples. Optional. 
IsDefaultbooleanIf set to “true” (note the lowercase!), the new created footer will be used as default in all new email messages. Optional. If not specified, default will be set to “false”

Response

Method returns ID of created footer. ID can be used e.g. for creating new email messages.

Response Data element:

Element/attributeTypeNotes
(Data element content)intID of created footer.

Examples

Creating new footer with default options

Request:

POST https://api.esv2.com/v2/Api/Footers HTTP/1.1 
Accept-Encoding: gzip,deflate 
Content-Type: application/xml 
User-Agent: Jakarta Commons-HttpClient/3.1 
Host: api.esv2.com 
Content-Length: 278 

<ApiRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <ApiKey>test_api_key1</ApiKey>
  <Data>   
    <Name>New footer</Name>
    <Html><![CDATA[<h2>Completely new footer</h2>]]></Html>
    <Plain>Just my new plain footer</Plain>
  </Data> 
</ApiRequest>

Response:

HTTP/1.1 201 Created 
Cache-Control: private 
Content-Type: text/xml; charset=utf-8 
Server: Microsoft-IIS/7.5 
X-AspNetMvc-Version: 3.0 
X-AspNet-Version: 4.0.30319 
X-Powered-By: ASP.NET 
Date: Thu, 05 Apr 2012 15:25:57 GMT 
Content-Length: 147 

<ApiResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <Data>33</Data>
</ApiResponse>

Creating footer with full options

Request:

POST https://api.esv2.com/v2/Api/Footers HTTP/1.1 
Accept-Encoding: gzip,deflate 
Content-Type: application/xml 
User-Agent: Jakarta Commons-HttpClient/3.1 
Host: api.esv2.com 
Content-Length: 1983 

<ApiRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
 <ApiKey>test_api_key1</ApiKey>
   <Data>
     <Name>New default footer</Name>
     <Html><![CDATA[<h2>Completely new default footer</h2>]]></Html>
     <Plain>Just my new plain default footer</Plain>
     <IsDefault>true</IsDefault>
     <AmpHtml><![CDATA[ <!doctype html>
              <html amp4email>
              <head>
              <meta charset="utf-8">
              <script async src="https://cdn.ampproject.org/v0.js"></script>
              <style amp4email-boilerplate>body{visibility:hidden}</style>
              </head>
              <body>
              Amp default footer

              Please use AMP markup if there is such like "amp-img" instead of "img"

              <amp-img src="https://sites.google.com/site/expertsenderapiv2/_/rsrc/1530873497175/config/Es- API.png.1530873496983.png"
             alt="Welcome"
             width="906"
             height="132">
             </amp-img>
             </body>
             </html>
             ]]></AmpHtml>
   </Data>
</ApiRequest>
On this page
To top