GET target-lists/{listname}/members

Overview

The Target-List API permits interaction with target lists associated with your company. You can use the GET /v2/target-lists/{listname}/members call to return the IDs of the members of the specified target list {listname}.

In order to limit payload size, the maximum number of members that can be returned in a single call is 100. The full list of members can be obtained via a series of GET /v2/target-lists/{listname}/members calls using appropriate values of the LIMIT and OFFSET parameters.

Resource URI

GEThttps://api.yesmail.com/v2/target-lists/{listname}/members

Call Description

The GET /target-lists/{listname}/members call returns the ID’s of the target list's members.

 

Parameters

Parameter

Requirement

Description

limit

Optional

Valid values are integers 0-100. The default is 25.

offset

Optional

Valid values are 0-any positive integer.  The default is 0.

HTTP Return Codes

Code

Description

200 OK

The request has succeeded.

400 Bad Request        

The request could not be understood by the server due to malformed syntax.  For example, invalid parameter values.

401 Unauthorized

The request requires user authentication.  Invalid Api-User and/or Api-Key header value.

404 Not Found

The target list "listname" does not exist or has been archived.

 

Response Payload: 
{
    "offset": 100,
    "limit": 25,
    "count": 2,
    "total": 102,
    "members": [
        {
             "id": "jsmith@zzz.com",
             "email": "jsmith@zzz.com",
        },
        {     
             "id": "jsmith2@zzz.com",           
             "email": "jsmith2@zzz.com",
         }
    ]
}