Overview
This request will return a subset of all your emails. Use the page and count parameters to get the whole list.
The Method
API | - | Method |
---|---|---|
REST | GET | https://[Your URL]/api/2.0/emails |
XML-RPC | Call | emails.ListEmails |
Your URL is the address of your install.
Your method must be structured as follows:
ListEmails(int $page, int $count, string $order, string $direction, \struct | array $filters) : array
Parameters
You can customise the list that this request returns using the following, optional, parameters:
Property | Type | Description | Required |
---|---|---|---|
contact id | integer | The contact id is the ID of the contact you want to re-send it to | |
$page | integer | The page number of the list. | no |
$count | integer | The number of results to return per page. | no |
$order | string | The name of the field to order the listing by. | no |
$direction | string | The direction of the ordering: ‘asc’ or ‘desc’. | no |
$filters | structarray | The fields to filter on. | no |
Responses
Type | Description |
---|---|
array | An array of emails. |
Code Samples
PHP (using REST API):
$url = '(Your URL)/api/2.0/emails'; $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);