Sales Agents
Get Sales Agent by lead
Tells whether a Sales Agent is working the lead (workingStatus working, stopped or not_working) and which one. A stopped lead names the Sales Agent that last worked it. A lead no Sales Agent works or worked answers not_working with every Sales Agent field null. A Sales Agent the caller cannot use (for example another member’s personal Sales Agent) is reported as salesAgentType other with its owner and name.
GET
/
v2.0
/
sales-agents
/
by-lead
Get Sales Agent by Lead
curl --request GET \
--url https://api.lofty.com/v2.0/sales-agents/by-lead \
--header 'Authorization: <authorization>'import requests
url = "https://api.lofty.com/v2.0/sales-agents/by-lead"
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/sales-agents/by-lead', 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/sales-agents/by-lead",
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/sales-agents/by-lead"
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/sales-agents/by-lead")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v2.0/sales-agents/by-lead")
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{
"workingStatus": "working",
"workingStartedAt": "2026-11-26T11:49:04-08:00",
"id": 12345,
"ownerUserId": 67890,
"ownerName": "Ashley Smith",
"salesAgentType": "personal",
"assistantName": "Anna",
"assistantHeadUrl": "<string>",
"virtualNumber": "+1234567890",
"virtualNumberCountry": "US",
"planType": "freemium",
"status": "ACTIVE",
"hasQuotaSeat": true
}{
"code": 0,
"message": "success",
"data": {}
}"<string>""<string>""<string>"Response
The lead's Sales Agent state
Whether a Sales Agent is working the lead, and which one. When no Sales Agent works or worked the lead, every Sales Agent field is null
⌘I
Get Sales Agent by Lead
curl --request GET \
--url https://api.lofty.com/v2.0/sales-agents/by-lead \
--header 'Authorization: <authorization>'import requests
url = "https://api.lofty.com/v2.0/sales-agents/by-lead"
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/sales-agents/by-lead', 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/sales-agents/by-lead",
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/sales-agents/by-lead"
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/sales-agents/by-lead")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v2.0/sales-agents/by-lead")
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{
"workingStatus": "working",
"workingStartedAt": "2026-11-26T11:49:04-08:00",
"id": 12345,
"ownerUserId": 67890,
"ownerName": "Ashley Smith",
"salesAgentType": "personal",
"assistantName": "Anna",
"assistantHeadUrl": "<string>",
"virtualNumber": "+1234567890",
"virtualNumberCountry": "US",
"planType": "freemium",
"status": "ACTIVE",
"hasQuotaSeat": true
}{
"code": 0,
"message": "success",
"data": {}
}"<string>""<string>""<string>"