Get subscriber lists
Lists collection allows retrieving of all subscriber lists defined in the system.
Request data format
Request URL parameters:
Parameters | Type | Notes |
---|---|---|
apiKey | string | Your API key, required for authentication. Required. |
seedLists | boolean | If set to ‘true’, only seed lists will be returned. If set to ‘false’, only regular lists will be returned. Optional. Default is false. |
Examples:
https://api.esv2.com/v2/Api/Lists?apiKey=YOUR_API_KEY_HERE
https://api.esv2.com/v2/Api/Lists?apiKey=YOUR_API_KEY_HERE&seedLists=true
Get list by List ID
Element/attribute | Type | Notes |
apiKey | string | Your API key, required for authentication. Required. |
ID | int | List ID. Required as a part of address (not GET parameter). See example below. |
https://api.esv2.com/v2/Api/Lists/123?apiKey=YOUR_API_KEY_HERE
Response
Response Data element:
Element/attribute | Type | Notes |
---|---|---|
Lists | array[complex] | Array of Lists elements. |
Lists element children:
Element/attribute | Type | Notes |
---|---|---|
Id | int | List identifier. |
Name | string | List name. |
FriendlyName | string | List name used for display purposes. |
Language | string | List language, e.g en-US. |
OptInMode | string | List opt-in mode. One of: – SingleOptIn – DoubleOptIn |
Get list by List ID
Response Data element:
Element/attribute | Type | Notes |
Name | string | List name. |
CreatedDate | datetime | List creation date |
Language | string | List language, e.g en-US. |
IsSeedList | bool | Is the seed list |
IsDeleted | bool | Is the list deleted |
OptInMode | string | List opt-in mode. One of: – SingleOptIn – DoubleOptIn |
Size | int | List size |
Example
Request:
GET https://api.esv2.com/v2/Api/Lists?apiKey=test_api_key1 HTTP/1.1
Accept-Encoding: gzip,deflate
Host: api.esv2.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
OK response:
HTTP/1.1 200 OK
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: Wed, 26 Jun 2013 13:35:54 GMT
Content-Length: 320
<ApiResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Data>
<Lists>
<List>
<Id>1</Id>
<Name>clients</Name>
<FriendlyName>My Clients</FriendlyName>
<Language>en-US</Language>
<OptInMode>DoubleOptIn</OptInMode>
</List>
<List>
<Id>2</Id>
<Name>friends</Name>
<FriendlyName>My Friends</FriendlyName>
<Language>pl-PL</Language>
<OptInMode>SingleOptIn</OptInMode>
</List>
</Lists>
</Data>
</ApiResponse>
Get list by List ID
Request:
GET
https://api.esv2.com/v2/Api/Lists/893?apiKey=test_api_key1 HTTP/1.1
Accept-Encoding: gzip,deflate
User-Agent: Jakarta Commons-HttpClient/3.1
Host: api.esv2.com
OK response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
Set-Cookie: ASP.NET_SessionId=3e0htsjefgfcby55ra5b2045; path=/; HttpOnly
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Mon, 24 May 2010 12:59:37 GMT
Content-Length: 369
<ApiResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Data>
<Name>list_name </Name>
<CreatedDate>2024-03-18T09:11:13.79</CreatedDate>
<Language>en-US</Language>
<IsSeedList>false</IsSeedList>
<IsDeleted>false</IsDeleted>
<OptInMode>DoubleOptIn</OptInMode>
<Size>2015</Size>
</Data>
</ApiResponse>