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
RESTGEThttps://[Your URL]/api/2.0/emails
XML-RPCCallemails.ListEmails

Your method must be structured as follows:

Parameters

You can customise the list that this request returns using the following, optional, parameters:

PropertyTypeDescriptionRequired
contact idintegerThe contact id is the ID of the contact you want to re-send it to
$pageintegerThe page number of the list.no
$countintegerThe number of results to return per page.no
$orderstringThe name of the field to order the listing by.no
$directionstringThe direction of the ordering: ‘asc’ or ‘desc’.no
$filtersstructarrayThe fields to filter on.no

Responses

TypeDescription
arrayAn 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);