Get Email
Returns the email identified by the given communication ID. The communication must be an email record, and the caller must have manage permission on the owning lead; otherwise 400 PERMISSION_DENIED is returned (no existence leak).
Webhook follow-up: when an Email webhook is delivered, pass each createdEmail[].timelineId from the payload as the communicationId path parameter to fetch the full record. The legacy createdEmail[].emailId field is kept for backward compatibility but is not interchangeable across communicationType — prefer timelineId.
curl --request GET \
--url https://api.lofty.com/v2.0/communication/email/{communicationId} \
--header 'Authorization: <authorization>'import requests
url = "https://api.lofty.com/v2.0/communication/email/{communicationId}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.lofty.com/v2.0/communication/email/{communicationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lofty.com/v2.0/communication/email/{communicationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lofty.com/v2.0/communication/email/{communicationId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lofty.com/v2.0/communication/email/{communicationId}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v2.0/communication/email/{communicationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": 123,
"leadId": 123,
"direction": "Outbound",
"agentId": 123,
"eventType": "Sent",
"emailEventTime": "<string>",
"emailType": "Auto",
"emailSubject": "<string>",
"fromPond": true
}"<string>""<string>""<string>"Headers
Bearer [access_token]
Path Parameters
Communication ID of the email.
x >= 1Response
Email retrieved successfully.
The ID of the email
The lead(Id) associated with the email
Outbound or Inbound email
"Outbound"
The related Agent ID
Sent, Opened or Bounced event
"Sent"
The event time of the email
Manual or Auto email
"Auto"
The subject of the email
Is the email sent from the lead pond
curl --request GET \
--url https://api.lofty.com/v2.0/communication/email/{communicationId} \
--header 'Authorization: <authorization>'import requests
url = "https://api.lofty.com/v2.0/communication/email/{communicationId}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.lofty.com/v2.0/communication/email/{communicationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lofty.com/v2.0/communication/email/{communicationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lofty.com/v2.0/communication/email/{communicationId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lofty.com/v2.0/communication/email/{communicationId}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v2.0/communication/email/{communicationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": 123,
"leadId": 123,
"direction": "Outbound",
"agentId": 123,
"eventType": "Sent",
"emailEventTime": "<string>",
"emailType": "Auto",
"emailSubject": "<string>",
"fromPond": true
}"<string>""<string>""<string>"