Create message content check task
Allows creating new task to check message content domain links on blacklist
Request data format
Data part of request for creating a new task.
Data element children:
Element/attribute | Type | Notes |
---|---|---|
Html | string | HTML content of newsletter. The data should be enclosed in CDATA section for XML transport. See examples. Optional.* |
Plain | string | Plain text content of newsletter. Optional.* |
AmpHtml | string | AMP HTML content of newsletter. The data should be enclosed in CDATA section for XML transport. See examples. Optional.* |
Preheader | string | Newsletter preheader. Optional. |
Header | integer | ID of header template to use. Optional. |
Footer | integer | ID of footer template to use. Optional. |
ContentFromUrl | complex | Used if content is not inside XML request but has to be downloaded from external source. Optional.* |
* You may either put content of newsletter inside using Html, Plain and/or AmpHtml elements or specify that content is to be downloaded from external source (such as webpage or FTP server as zipped file with HTML and images) using ContentFromUrl element. If content was not found in either place, an error message will be returned. If there are more than one Html, Plain and/or AmpHtml files only the last file will be the content of message.If you would like to send AMP Html you should provide Html and/or Plain as a fallback version of email. AMP Html content must contain all needed elements (see examples) and all links must be secure links (like https://).
ContentFromUrl element children:
Element/attribute | Type | Notes |
---|---|---|
Url | string | URL address of imported file. Supported protocols are HTTP, HTTPS, FTP, FTPS and SFTP. E.g. ftp://www.domain.com/mycreative.zip. |
Username | string | Username used for authentication. Optional. |
Password | string | Password used for authentication. Optional. |
FtpUseActiveMode | boolean | If set to “true”, active mode will be used for FTP connections. Default value is “false” – passive connection mode will be used. |
FtpAuth | string | Authentication method for secure FTP servers. Optional. Valid values are: None – FTP server does not support secure authentication (default) ExplicitTls – Explicit TLS/SSL authentication ExplicitSsl – Explicit SSL only authentication ImplicitSsl – Implicit SSL authentication |
Response
Response Data element:
Element/attribute | Type | Notes |
---|---|---|
Id | Guid | Id of created check message content task |
Examples
Create new task to analyze message content
Request:
POST https://api.esv2.com/v2/Api/CheckMessageContent HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
User-Agent: Jakarta Commons-HttpClient/3.1
Host: api.esv2.com
Content-Length: 457
<ApiRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<ApiKey>2OAEcpz0Rwv3Mhc9nTQK</ApiKey>
<Data>
<Plain>Hello friend, how are you?</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: Tue, 27 Mar 2012 13:28:01 GMT
Content-Length: 149
<ApiResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Id>869786bf-768f-4036-9128-d05667eac888</Id>
</ApiResponse>
Create new task to analyze message content from external source and full options
Request:
POST https://api.esv2.com/v2/Api/CheckMessageContent HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
User-Agent: Jakarta Commons-HttpClient/3.1
Host: api.esv2.com
Content-Length: 1727
<ApiRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<ApiKey>2OAEcpz0Rwv3Mhc9nTQK</ApiKey>
<Data>
<ContentFromUrl>
<Url>ftp://ftp.domain.com.creative.zip</Url>
<Username>username</Username>
<Password>password</Password>
<FtpAuth>ExplicitTls</FtpAuth>
</ContentFromUrl>
</Data>
</ApiRequest>
Create new task to analyze message with AMP Html content
Request:
POST https://api.esv2.com/v2/Api/CheckMessageContent HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
User-Agent: Jakarta Commons-HttpClient/3.1
Host: api.esv2.com
Content-Length: 32566
<ApiRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<ApiKey>2OAEcpz0Rwv3Mhc9nTQK</ApiKey>
<Data>
<Html>Some fallback HTML code here</Html>
<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>
Hello, AMP world.
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>