Overview
You can use this request to retrieve the emails sent to a specific list.
The Method
API | - | Method |
---|---|---|
REST | GET | https://[Your URL]/api/2.0/emails_by_list/$listId |
XML-RPC | Call | emails.ListEmailsByList |
Your URL is the address of your install.
Your method must be structured as follows:
EmailsByList:array
Parameters
Property | Type | Description | Required |
---|---|---|---|
$listid | string | ID of the list you need to retrieve emails for. | yes |
Responses
Type | Description |
---|---|
array | An 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);