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 |
---|---|---|
REST | GET | https://[Your URL]/api/2.0/emails/$id |
XML-RPC | Call | emails.GetEmail |
Your URL is the address of your install.
Your method must be structured as follows:
GetEmail(integer $id) : object
Parameters
Property | Type | Description | Required |
---|---|---|---|
$id | integer | The ID of the email to retrieve. | yes |
Responses
Type | Description |
---|---|
object | The 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);