Overview

This request allows you to retrieve the properties of a specific email. Use the email’s ID to specify which email you need the properties for.

The Method

API-Method
RESTGEThttps://[Your URL]/api/2.0/emails/$id
XML-RPCCallemails.GetEmail

Your method must be structured as follows:

Parameters

PropertyTypeDescriptionRequired
$idintegerThe ID of the email to retrieve.yes

Responses

TypeDescription
objectThe email object.

Code Samples

PHP (using REST API):

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