Overview

You can use this request to retrieve the subscription status of a contact on a specific list.

The Method

API-Method
REST POSThttps://[Your URL]/api/2.0/list_subscriptions/:list_id/:contact_id
XML-RPCCalllist._subscriptions.GetListSubscription

Your method must be structured as follows:

Parameters

Property TypeDescriptionRequired
$list_idintegerThe list ID.yes
$contact_idintegerThe contact ID.yes

Responses

\pmaContactsListsMappingsObject

Code Samples

PHP (using REST API):

$url = '(Your URL)/api/2.0/list_subscriptions/:list_id/:contact_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);