Overview

This request will return a subset of all the contacts on a specific list.

The Method

APIMethodEndpoint
RESTGEThttps://[Your URL]/api/2.0/list_subscriptions/:list_id
XML-RPCCalllist._subscriptions.ShowListSubscriptions

Your method must be structured as follows:

Parameters

Required Parameters
Property TypeDescriptionRequired
$list_idintegerThe ID of the list you’re querying.yes
Optional Parameters

You can include the page, count, order, direction and filter variables to affect the list you receive as request variables.

Property TypeDescriptionRequired
$list_idintegerThe ID of the list you’re querying.yes

Responses

TypeDescription
arrayAn array of contacts.

Code Samples

PHP (using REST API):

$url = '(Your URL)/api/2.0/list_subscriptions/:list_id';
$method = 'GET';
$cSession = curl_init();
$headers = array();
$auth = base64_encode($username . ':' . $apikey);
$headers[] = 'Authorization: Basic ' . $auth;
curl_setopt($cSession, CURLOPT_URL, $url);
curl_setopt($cSession, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cSession, CURLOPT_HEADER, false);
curl_setopt($cSession, CURLOPT_CUSTOMREQUEST, strtoupper($method));
curl_setopt($cSession, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($cSession);
curl_close($cSession);