Skip to content

Get subscriber lists

Lists collection allows retrieving of all subscriber lists defined in the system.

Request data format

Request URL parameters:

ParametersTypeNotes
apiKeystringYour API key, required for authentication. Required.
seedListsbooleanIf 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/attributeTypeNotes
apiKeystringYour API key, required for authentication. Required.
IDintList 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/attributeTypeNotes
Listsarray[complex]Array of Lists elements.

Lists element children:

Element/attributeTypeNotes
IdintList identifier.
NamestringList name.
FriendlyNamestringList name used for display purposes.
LanguagestringList language, e.g en-US.
OptInModestringList opt-in mode. One of:
– SingleOptIn
– DoubleOptIn

Get list by List ID

Response Data element:

Element/attributeTypeNotes
NamestringList name.
CreatedDatedatetimeList creation date
LanguagestringList language, e.g en-US.
IsSeedListboolIs the seed list
IsDeletedboolIs the list deleted
OptInModestringList opt-in mode. One of:
– SingleOptIn
– DoubleOptIn
SizeintList 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>
On this page
To top