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

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

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>
On this page
To top