Communication
Search by Agent (cursor paged)
Returns communication timeline entries for the caller (or the caller’s team when teamView=true, requiring ACCESS_ALL_TEAM_LEADS permission) within a time range.
- The time window (endTime - startTime) may span up to 90 days in a single query.
- type accepts CALL, TEXT, EMAIL, or ALL to fetch all three together in one request.
- limit controls the page size and must be between 1 and 1000 (default 100).
- Cursor pagination: the response returns a nextCursor token; pass it back as the ‘cursor’ parameter to fetch the next page. Keep paging while nextCursor is non-null and stop when it is null. Because a full page cannot tell whether more entries exist, the last page may come back with an empty data array and nextCursor=null - treat that as end-of-data, not an error. This is the recommended way to sync large or historical ranges.
GET
/
v2.0
/
communication
/
agent
Search communications by Agent (cursor paged)
curl --request GET \
--url https://api.lofty.com/v2.0/communication/agent \
--header 'Authorization: <authorization>'import requests
url = "https://api.lofty.com/v2.0/communication/agent"
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/agent', 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/agent",
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/agent"
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/agent")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v2.0/communication/agent")
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{
"data": [
{
"id": 123,
"leadId": 123,
"agentId": 123,
"direction": "Outbound",
"callOutcome": "Talked",
"callDuration": "<string>",
"status": "Delivered",
"communicationTime": "<string>",
"communicationType": "AUTO",
"eventType": "Call",
"fromPond": true
}
],
"nextCursor": "<string>",
"hasMore": true,
"limit": 100,
"totalCount": 1234
}"<string>""<string>""<string>"Query Parameters
Response
Cursor-paged communication entries.
⌘I
Search communications by Agent (cursor paged)
curl --request GET \
--url https://api.lofty.com/v2.0/communication/agent \
--header 'Authorization: <authorization>'import requests
url = "https://api.lofty.com/v2.0/communication/agent"
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/agent', 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/agent",
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/agent"
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/agent")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v2.0/communication/agent")
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{
"data": [
{
"id": 123,
"leadId": 123,
"agentId": 123,
"direction": "Outbound",
"callOutcome": "Talked",
"callDuration": "<string>",
"status": "Delivered",
"communicationTime": "<string>",
"communicationType": "AUTO",
"eventType": "Call",
"fromPond": true
}
],
"nextCursor": "<string>",
"hasMore": true,
"limit": 100,
"totalCount": 1234
}"<string>""<string>""<string>"