Overview

You can use this request to retrieve the emails sent to a specific list.

The Method

API-Method
RESTGEThttps://[Your URL]/api/2.0/emails_by_list/$listId
XML-RPCCallemails.ListEmailsByList

Your method must be structured as follows:

Parameters

PropertyTypeDescriptionRequired
$listid stringID of the list you need to retrieve emails for.yes

Responses

TypeDescription
arrayAn array of emails.

Code Samples

PHP (using REST API):

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