API Documentation V2
Lists collection allows creating new subscriber lists. Created lists can then be used to import subscribers or add them manually using API, panel or any other available method.
Data part of request for creating a new subscribers list.
Data element children:
GeneralSettings element children:
Supported list languages:
Supported list charsets:
Note: Language and charset list is a subject to change. Ask ExpertSender Support if your preferred language/charset could be supported.
AddressSettings element children:
AddressSettings element children:
DomainSettings element children:
ConfirmationEmail element children:
*For maximum accessibility, confirmation emails are required to have both HTML and plain text contents. This is a special case. There is no such requirement for regular emails such as newsletters.
Method returns ID of created subscriber list. ID can be used e.g. to schedule import to this list.
Response Data element:
Creating new subscribers list with default options
Request:
POST https://api.esv2.com/v2/Api/Lists 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>
<GeneralSettings>
<Name>API test list</Name>
</GeneralSettings>
</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 new subscribers list with full options
Request:
POST https://api.esv2.com/v2/Api/Lists 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>
<GeneralSettings>
<Name>API test list</Name>
<FriendlyName>Best offers!</FriendlyName>
<Description>This is a test list created using API</Description>
<Language>en-US</Language>
<OptInMode>DoubleOptIn</OptInMode>
<Charset>ISO-8859-1</Charset>
<SubscriptionConfirmPageUrl>
http://www.test.com
</SubscriptionConfirmPageUrl>
<SubscriptionThankYouPageUrl>
http://www.test.com
</SubscriptionThankYouPageUrl>
<RemovalPageUrl>http://www.test.com</RemovalPageUrl>
<PreferencesChangeUrl>http://www.test.com</PreferencesChangeUrl>
</GeneralSettings>
<AddressSettings>
<Company>TestCompany</Company>
<Address>Test Blvd.</Address>
<Address2>123</Address2>
<City>New York</City>
<ZipPostalCode>12345</ZipPostalCode>
<StateProvinceRegion>CA</StateProvinceRegion>
<Country>USA</Country>
</AddressSettings>
<SubscriberSettings>
<DefaultSubscriberName>Respectful Customer</DefaultSubscriberName>
<DefaultSubscriberFirstname>Customer</DefaultSubscriberFirstname>
<DefaultSubscriberLastname>Respectful</DefaultSubscriberLastname>
<FrequencyCappingTimeEmail>12</FrequencyCappingTimeEmail>
<FrequencyCappingTimeSmsMms>24</FrequencyCappingTimeSmsMms>
<DisableStandardMessageFooter>true</DisableStandardMessageFooter>
<DisableListUnsubscribeHeader>true</DisableListUnsubscribeHeader>
<AskBeforeUnsubscribing>true</AskBeforeUnsubscribing>
</SubscriberSettings>
<DomainSettings>
<ClickTrackingDomain>testdomain.com</ClickTrackingDomain>
</DomainSettings>
<ConfirmationEmail>
<FromName>Test</FromName>
<FromEmail>test@test.pl</FromEmail>
<Subject>to jest testowy subject</Subject>
<Html>
<![CDATA[<a href="*[link_confirm]*">Confirm subscription</a>]]>
</Html>
<Plain>Confirm your subscription: *[link_confirm]*</Plain>
</ConfirmationEmail>
</Data>
</ApiRequest>