Update Sales Agent settings
Update the Sales Agent settings for the current user. Sales Agent creation must be completed in CRM. This API only supports updating existing settings.
curl --request PUT \
--url https://api.lofty.com/v2.0/sales-agent/settings \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"id": 12345,
"assistantName": "Anna",
"virtualNumber": "+1234567890",
"virtualNumberCountry": "US",
"callTransferType": "Disabled",
"fixedNumber": "+1234567890",
"agentExperience": "10 years in real estate",
"rentalBusiness": false,
"websiteChannel": true,
"textChannel": true,
"emailChannel": true,
"startActiveHour": 8,
"endActiveHour": 20,
"activeDays": [
1,
2,
3,
4,
5
],
"leadTypes": [
1,
2
],
"leadSources": [
1001,
1002
],
"leadPipelines": [
2001,
2002
],
"agentIds": [
101,
102
],
"officeIds": [
201,
202
],
"leadPondIds": [
301,
302
],
"newLeadEnable": true,
"visitorsEnable": true,
"followUpRole": "AI"
}
'import requests
url = "https://api.lofty.com/v2.0/sales-agent/settings"
payload = {
"id": 12345,
"assistantName": "Anna",
"virtualNumber": "+1234567890",
"virtualNumberCountry": "US",
"callTransferType": "Disabled",
"fixedNumber": "+1234567890",
"agentExperience": "10 years in real estate",
"rentalBusiness": False,
"websiteChannel": True,
"textChannel": True,
"emailChannel": True,
"startActiveHour": 8,
"endActiveHour": 20,
"activeDays": [1, 2, 3, 4, 5],
"leadTypes": [1, 2],
"leadSources": [1001, 1002],
"leadPipelines": [2001, 2002],
"agentIds": [101, 102],
"officeIds": [201, 202],
"leadPondIds": [301, 302],
"newLeadEnable": True,
"visitorsEnable": True,
"followUpRole": "AI"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
id: 12345,
assistantName: 'Anna',
virtualNumber: '+1234567890',
virtualNumberCountry: 'US',
callTransferType: 'Disabled',
fixedNumber: '+1234567890',
agentExperience: '10 years in real estate',
rentalBusiness: false,
websiteChannel: true,
textChannel: true,
emailChannel: true,
startActiveHour: 8,
endActiveHour: 20,
activeDays: [1, 2, 3, 4, 5],
leadTypes: [1, 2],
leadSources: [1001, 1002],
leadPipelines: [2001, 2002],
agentIds: [101, 102],
officeIds: [201, 202],
leadPondIds: [301, 302],
newLeadEnable: true,
visitorsEnable: true,
followUpRole: 'AI'
})
};
fetch('https://api.lofty.com/v2.0/sales-agent/settings', 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-agent/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => 12345,
'assistantName' => 'Anna',
'virtualNumber' => '+1234567890',
'virtualNumberCountry' => 'US',
'callTransferType' => 'Disabled',
'fixedNumber' => '+1234567890',
'agentExperience' => '10 years in real estate',
'rentalBusiness' => false,
'websiteChannel' => true,
'textChannel' => true,
'emailChannel' => true,
'startActiveHour' => 8,
'endActiveHour' => 20,
'activeDays' => [
1,
2,
3,
4,
5
],
'leadTypes' => [
1,
2
],
'leadSources' => [
1001,
1002
],
'leadPipelines' => [
2001,
2002
],
'agentIds' => [
101,
102
],
'officeIds' => [
201,
202
],
'leadPondIds' => [
301,
302
],
'newLeadEnable' => true,
'visitorsEnable' => true,
'followUpRole' => 'AI'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lofty.com/v2.0/sales-agent/settings"
payload := strings.NewReader("{\n \"id\": 12345,\n \"assistantName\": \"Anna\",\n \"virtualNumber\": \"+1234567890\",\n \"virtualNumberCountry\": \"US\",\n \"callTransferType\": \"Disabled\",\n \"fixedNumber\": \"+1234567890\",\n \"agentExperience\": \"10 years in real estate\",\n \"rentalBusiness\": false,\n \"websiteChannel\": true,\n \"textChannel\": true,\n \"emailChannel\": true,\n \"startActiveHour\": 8,\n \"endActiveHour\": 20,\n \"activeDays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ],\n \"leadTypes\": [\n 1,\n 2\n ],\n \"leadSources\": [\n 1001,\n 1002\n ],\n \"leadPipelines\": [\n 2001,\n 2002\n ],\n \"agentIds\": [\n 101,\n 102\n ],\n \"officeIds\": [\n 201,\n 202\n ],\n \"leadPondIds\": [\n 301,\n 302\n ],\n \"newLeadEnable\": true,\n \"visitorsEnable\": true,\n \"followUpRole\": \"AI\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.lofty.com/v2.0/sales-agent/settings")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"id\": 12345,\n \"assistantName\": \"Anna\",\n \"virtualNumber\": \"+1234567890\",\n \"virtualNumberCountry\": \"US\",\n \"callTransferType\": \"Disabled\",\n \"fixedNumber\": \"+1234567890\",\n \"agentExperience\": \"10 years in real estate\",\n \"rentalBusiness\": false,\n \"websiteChannel\": true,\n \"textChannel\": true,\n \"emailChannel\": true,\n \"startActiveHour\": 8,\n \"endActiveHour\": 20,\n \"activeDays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ],\n \"leadTypes\": [\n 1,\n 2\n ],\n \"leadSources\": [\n 1001,\n 1002\n ],\n \"leadPipelines\": [\n 2001,\n 2002\n ],\n \"agentIds\": [\n 101,\n 102\n ],\n \"officeIds\": [\n 201,\n 202\n ],\n \"leadPondIds\": [\n 301,\n 302\n ],\n \"newLeadEnable\": true,\n \"visitorsEnable\": true,\n \"followUpRole\": \"AI\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v2.0/sales-agent/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"id\": 12345,\n \"assistantName\": \"Anna\",\n \"virtualNumber\": \"+1234567890\",\n \"virtualNumberCountry\": \"US\",\n \"callTransferType\": \"Disabled\",\n \"fixedNumber\": \"+1234567890\",\n \"agentExperience\": \"10 years in real estate\",\n \"rentalBusiness\": false,\n \"websiteChannel\": true,\n \"textChannel\": true,\n \"emailChannel\": true,\n \"startActiveHour\": 8,\n \"endActiveHour\": 20,\n \"activeDays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ],\n \"leadTypes\": [\n 1,\n 2\n ],\n \"leadSources\": [\n 1001,\n 1002\n ],\n \"leadPipelines\": [\n 2001,\n 2002\n ],\n \"agentIds\": [\n 101,\n 102\n ],\n \"officeIds\": [\n 201,\n 202\n ],\n \"leadPondIds\": [\n 301,\n 302\n ],\n \"newLeadEnable\": true,\n \"visitorsEnable\": true,\n \"followUpRole\": \"AI\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Operation successful"
}"<string>""<string>""<string>"Body
Sales agent setting request
Sales Agent ID (required, must be greater than 0)
12345
Assistant name
"Anna"
Virtual phone number
"+1234567890"
Virtual number country
"US"
Call transfer type: Disabled, ToAssignedAgent
"Disabled"
Fixed phone number
"+1234567890"
Agent experience description
"10 years in real estate"
Whether agent handles rental business
false
Whether website channel is enabled
true
Whether text channel is enabled
true
Whether email channel is enabled
true
Active start hour (0-23)
8
Active end hour (0-23)
20
Active days of week (0=Sun, 6=Sat), empty means all days
[1, 2, 3, 4, 5]
Lead types filter, empty means all
[1, 2]
Lead source IDs filter, empty means all
[1001, 1002]
Lead pipeline IDs filter, empty means all
[2001, 2002]
Agent IDs with access, contains -1 means all
[101, 102]
Office IDs with access, contains -1 means all
[201, 202]
Lead pond IDs with access, contains -1 means all
[301, 302]
Whether new lead follow-up is enabled
true
Whether visitor follow-up is enabled
true
Follow up role: AI or Agent
"AI"
Response
Settings updated successfully.
Generic message response
Result message
"Operation successful"
curl --request PUT \
--url https://api.lofty.com/v2.0/sales-agent/settings \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"id": 12345,
"assistantName": "Anna",
"virtualNumber": "+1234567890",
"virtualNumberCountry": "US",
"callTransferType": "Disabled",
"fixedNumber": "+1234567890",
"agentExperience": "10 years in real estate",
"rentalBusiness": false,
"websiteChannel": true,
"textChannel": true,
"emailChannel": true,
"startActiveHour": 8,
"endActiveHour": 20,
"activeDays": [
1,
2,
3,
4,
5
],
"leadTypes": [
1,
2
],
"leadSources": [
1001,
1002
],
"leadPipelines": [
2001,
2002
],
"agentIds": [
101,
102
],
"officeIds": [
201,
202
],
"leadPondIds": [
301,
302
],
"newLeadEnable": true,
"visitorsEnable": true,
"followUpRole": "AI"
}
'import requests
url = "https://api.lofty.com/v2.0/sales-agent/settings"
payload = {
"id": 12345,
"assistantName": "Anna",
"virtualNumber": "+1234567890",
"virtualNumberCountry": "US",
"callTransferType": "Disabled",
"fixedNumber": "+1234567890",
"agentExperience": "10 years in real estate",
"rentalBusiness": False,
"websiteChannel": True,
"textChannel": True,
"emailChannel": True,
"startActiveHour": 8,
"endActiveHour": 20,
"activeDays": [1, 2, 3, 4, 5],
"leadTypes": [1, 2],
"leadSources": [1001, 1002],
"leadPipelines": [2001, 2002],
"agentIds": [101, 102],
"officeIds": [201, 202],
"leadPondIds": [301, 302],
"newLeadEnable": True,
"visitorsEnable": True,
"followUpRole": "AI"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
id: 12345,
assistantName: 'Anna',
virtualNumber: '+1234567890',
virtualNumberCountry: 'US',
callTransferType: 'Disabled',
fixedNumber: '+1234567890',
agentExperience: '10 years in real estate',
rentalBusiness: false,
websiteChannel: true,
textChannel: true,
emailChannel: true,
startActiveHour: 8,
endActiveHour: 20,
activeDays: [1, 2, 3, 4, 5],
leadTypes: [1, 2],
leadSources: [1001, 1002],
leadPipelines: [2001, 2002],
agentIds: [101, 102],
officeIds: [201, 202],
leadPondIds: [301, 302],
newLeadEnable: true,
visitorsEnable: true,
followUpRole: 'AI'
})
};
fetch('https://api.lofty.com/v2.0/sales-agent/settings', 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-agent/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => 12345,
'assistantName' => 'Anna',
'virtualNumber' => '+1234567890',
'virtualNumberCountry' => 'US',
'callTransferType' => 'Disabled',
'fixedNumber' => '+1234567890',
'agentExperience' => '10 years in real estate',
'rentalBusiness' => false,
'websiteChannel' => true,
'textChannel' => true,
'emailChannel' => true,
'startActiveHour' => 8,
'endActiveHour' => 20,
'activeDays' => [
1,
2,
3,
4,
5
],
'leadTypes' => [
1,
2
],
'leadSources' => [
1001,
1002
],
'leadPipelines' => [
2001,
2002
],
'agentIds' => [
101,
102
],
'officeIds' => [
201,
202
],
'leadPondIds' => [
301,
302
],
'newLeadEnable' => true,
'visitorsEnable' => true,
'followUpRole' => 'AI'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lofty.com/v2.0/sales-agent/settings"
payload := strings.NewReader("{\n \"id\": 12345,\n \"assistantName\": \"Anna\",\n \"virtualNumber\": \"+1234567890\",\n \"virtualNumberCountry\": \"US\",\n \"callTransferType\": \"Disabled\",\n \"fixedNumber\": \"+1234567890\",\n \"agentExperience\": \"10 years in real estate\",\n \"rentalBusiness\": false,\n \"websiteChannel\": true,\n \"textChannel\": true,\n \"emailChannel\": true,\n \"startActiveHour\": 8,\n \"endActiveHour\": 20,\n \"activeDays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ],\n \"leadTypes\": [\n 1,\n 2\n ],\n \"leadSources\": [\n 1001,\n 1002\n ],\n \"leadPipelines\": [\n 2001,\n 2002\n ],\n \"agentIds\": [\n 101,\n 102\n ],\n \"officeIds\": [\n 201,\n 202\n ],\n \"leadPondIds\": [\n 301,\n 302\n ],\n \"newLeadEnable\": true,\n \"visitorsEnable\": true,\n \"followUpRole\": \"AI\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.lofty.com/v2.0/sales-agent/settings")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"id\": 12345,\n \"assistantName\": \"Anna\",\n \"virtualNumber\": \"+1234567890\",\n \"virtualNumberCountry\": \"US\",\n \"callTransferType\": \"Disabled\",\n \"fixedNumber\": \"+1234567890\",\n \"agentExperience\": \"10 years in real estate\",\n \"rentalBusiness\": false,\n \"websiteChannel\": true,\n \"textChannel\": true,\n \"emailChannel\": true,\n \"startActiveHour\": 8,\n \"endActiveHour\": 20,\n \"activeDays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ],\n \"leadTypes\": [\n 1,\n 2\n ],\n \"leadSources\": [\n 1001,\n 1002\n ],\n \"leadPipelines\": [\n 2001,\n 2002\n ],\n \"agentIds\": [\n 101,\n 102\n ],\n \"officeIds\": [\n 201,\n 202\n ],\n \"leadPondIds\": [\n 301,\n 302\n ],\n \"newLeadEnable\": true,\n \"visitorsEnable\": true,\n \"followUpRole\": \"AI\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v2.0/sales-agent/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"id\": 12345,\n \"assistantName\": \"Anna\",\n \"virtualNumber\": \"+1234567890\",\n \"virtualNumberCountry\": \"US\",\n \"callTransferType\": \"Disabled\",\n \"fixedNumber\": \"+1234567890\",\n \"agentExperience\": \"10 years in real estate\",\n \"rentalBusiness\": false,\n \"websiteChannel\": true,\n \"textChannel\": true,\n \"emailChannel\": true,\n \"startActiveHour\": 8,\n \"endActiveHour\": 20,\n \"activeDays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ],\n \"leadTypes\": [\n 1,\n 2\n ],\n \"leadSources\": [\n 1001,\n 1002\n ],\n \"leadPipelines\": [\n 2001,\n 2002\n ],\n \"agentIds\": [\n 101,\n 102\n ],\n \"officeIds\": [\n 201,\n 202\n ],\n \"leadPondIds\": [\n 301,\n 302\n ],\n \"newLeadEnable\": true,\n \"visitorsEnable\": true,\n \"followUpRole\": \"AI\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Operation successful"
}"<string>""<string>""<string>"