Activities
Add activity
Add activity to a lead.
POST
/
v1.0
/
leads
/
{leadId}
/
activity
Add activity
curl --request POST \
--url https://api.lofty.com/v1.0/leads/{leadId}/activity \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"type": "Search",
"text": "Search",
"link": "https://lofty.com",
"picture": "https://lofty.com/default.jpg",
"created": 1747272300000,
"listing": {
"price": 100000,
"state": "California",
"city": "New York",
"streetAddress": "22348 Regnart RD",
"zipCode": "25401",
"county": "<string>",
"propertyType": "Single Family Home",
"bedrooms": 3,
"bathrooms": 2,
"squareFeet": 100,
"lotSize": 26.33,
"parkingSpace": 1,
"floors": 1,
"mailAddress": true,
"id": 123,
"leadUserId": 123,
"listingId": "<string>",
"autoListingId": 123,
"label": "<string>",
"note": "<string>",
"listingStatus": "<string>",
"labelList": "<string>",
"pictureUrl": "<string>",
"siteListingUrl": "<string>",
"labelType": "<string>",
"priceMax": 10000000,
"priceMin": 100000
},
"scheduledDate": "<string>",
"pageName": "Blog Registration"
}
'import requests
url = "https://api.lofty.com/v1.0/leads/{leadId}/activity"
payload = {
"type": "Search",
"text": "Search",
"link": "https://lofty.com",
"picture": "https://lofty.com/default.jpg",
"created": 1747272300000,
"listing": {
"price": 100000,
"state": "California",
"city": "New York",
"streetAddress": "22348 Regnart RD",
"zipCode": "25401",
"county": "<string>",
"propertyType": "Single Family Home",
"bedrooms": 3,
"bathrooms": 2,
"squareFeet": 100,
"lotSize": 26.33,
"parkingSpace": 1,
"floors": 1,
"mailAddress": True,
"id": 123,
"leadUserId": 123,
"listingId": "<string>",
"autoListingId": 123,
"label": "<string>",
"note": "<string>",
"listingStatus": "<string>",
"labelList": "<string>",
"pictureUrl": "<string>",
"siteListingUrl": "<string>",
"labelType": "<string>",
"priceMax": 10000000,
"priceMin": 100000
},
"scheduledDate": "<string>",
"pageName": "Blog Registration"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
type: 'Search',
text: 'Search',
link: 'https://lofty.com',
picture: 'https://lofty.com/default.jpg',
created: 1747272300000,
listing: {
price: 100000,
state: 'California',
city: 'New York',
streetAddress: '22348 Regnart RD',
zipCode: '25401',
county: '<string>',
propertyType: 'Single Family Home',
bedrooms: 3,
bathrooms: 2,
squareFeet: 100,
lotSize: 26.33,
parkingSpace: 1,
floors: 1,
mailAddress: true,
id: 123,
leadUserId: 123,
listingId: '<string>',
autoListingId: 123,
label: '<string>',
note: '<string>',
listingStatus: '<string>',
labelList: '<string>',
pictureUrl: '<string>',
siteListingUrl: '<string>',
labelType: '<string>',
priceMax: 10000000,
priceMin: 100000
},
scheduledDate: '<string>',
pageName: 'Blog Registration'
})
};
fetch('https://api.lofty.com/v1.0/leads/{leadId}/activity', 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/v1.0/leads/{leadId}/activity",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'Search',
'text' => 'Search',
'link' => 'https://lofty.com',
'picture' => 'https://lofty.com/default.jpg',
'created' => 1747272300000,
'listing' => [
'price' => 100000,
'state' => 'California',
'city' => 'New York',
'streetAddress' => '22348 Regnart RD',
'zipCode' => '25401',
'county' => '<string>',
'propertyType' => 'Single Family Home',
'bedrooms' => 3,
'bathrooms' => 2,
'squareFeet' => 100,
'lotSize' => 26.33,
'parkingSpace' => 1,
'floors' => 1,
'mailAddress' => true,
'id' => 123,
'leadUserId' => 123,
'listingId' => '<string>',
'autoListingId' => 123,
'label' => '<string>',
'note' => '<string>',
'listingStatus' => '<string>',
'labelList' => '<string>',
'pictureUrl' => '<string>',
'siteListingUrl' => '<string>',
'labelType' => '<string>',
'priceMax' => 10000000,
'priceMin' => 100000
],
'scheduledDate' => '<string>',
'pageName' => 'Blog Registration'
]),
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/v1.0/leads/{leadId}/activity"
payload := strings.NewReader("{\n \"type\": \"Search\",\n \"text\": \"Search\",\n \"link\": \"https://lofty.com\",\n \"picture\": \"https://lofty.com/default.jpg\",\n \"created\": 1747272300000,\n \"listing\": {\n \"price\": 100000,\n \"state\": \"California\",\n \"city\": \"New York\",\n \"streetAddress\": \"22348 Regnart RD\",\n \"zipCode\": \"25401\",\n \"county\": \"<string>\",\n \"propertyType\": \"Single Family Home\",\n \"bedrooms\": 3,\n \"bathrooms\": 2,\n \"squareFeet\": 100,\n \"lotSize\": 26.33,\n \"parkingSpace\": 1,\n \"floors\": 1,\n \"mailAddress\": true,\n \"id\": 123,\n \"leadUserId\": 123,\n \"listingId\": \"<string>\",\n \"autoListingId\": 123,\n \"label\": \"<string>\",\n \"note\": \"<string>\",\n \"listingStatus\": \"<string>\",\n \"labelList\": \"<string>\",\n \"pictureUrl\": \"<string>\",\n \"siteListingUrl\": \"<string>\",\n \"labelType\": \"<string>\",\n \"priceMax\": 10000000,\n \"priceMin\": 100000\n },\n \"scheduledDate\": \"<string>\",\n \"pageName\": \"Blog Registration\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.lofty.com/v1.0/leads/{leadId}/activity")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"type\": \"Search\",\n \"text\": \"Search\",\n \"link\": \"https://lofty.com\",\n \"picture\": \"https://lofty.com/default.jpg\",\n \"created\": 1747272300000,\n \"listing\": {\n \"price\": 100000,\n \"state\": \"California\",\n \"city\": \"New York\",\n \"streetAddress\": \"22348 Regnart RD\",\n \"zipCode\": \"25401\",\n \"county\": \"<string>\",\n \"propertyType\": \"Single Family Home\",\n \"bedrooms\": 3,\n \"bathrooms\": 2,\n \"squareFeet\": 100,\n \"lotSize\": 26.33,\n \"parkingSpace\": 1,\n \"floors\": 1,\n \"mailAddress\": true,\n \"id\": 123,\n \"leadUserId\": 123,\n \"listingId\": \"<string>\",\n \"autoListingId\": 123,\n \"label\": \"<string>\",\n \"note\": \"<string>\",\n \"listingStatus\": \"<string>\",\n \"labelList\": \"<string>\",\n \"pictureUrl\": \"<string>\",\n \"siteListingUrl\": \"<string>\",\n \"labelType\": \"<string>\",\n \"priceMax\": 10000000,\n \"priceMin\": 100000\n },\n \"scheduledDate\": \"<string>\",\n \"pageName\": \"Blog Registration\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v1.0/leads/{leadId}/activity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"type\": \"Search\",\n \"text\": \"Search\",\n \"link\": \"https://lofty.com\",\n \"picture\": \"https://lofty.com/default.jpg\",\n \"created\": 1747272300000,\n \"listing\": {\n \"price\": 100000,\n \"state\": \"California\",\n \"city\": \"New York\",\n \"streetAddress\": \"22348 Regnart RD\",\n \"zipCode\": \"25401\",\n \"county\": \"<string>\",\n \"propertyType\": \"Single Family Home\",\n \"bedrooms\": 3,\n \"bathrooms\": 2,\n \"squareFeet\": 100,\n \"lotSize\": 26.33,\n \"parkingSpace\": 1,\n \"floors\": 1,\n \"mailAddress\": true,\n \"id\": 123,\n \"leadUserId\": 123,\n \"listingId\": \"<string>\",\n \"autoListingId\": 123,\n \"label\": \"<string>\",\n \"note\": \"<string>\",\n \"listingStatus\": \"<string>\",\n \"labelList\": \"<string>\",\n \"pictureUrl\": \"<string>\",\n \"siteListingUrl\": \"<string>\",\n \"labelType\": \"<string>\",\n \"priceMax\": 10000000,\n \"priceMin\": 100000\n },\n \"scheduledDate\": \"<string>\",\n \"pageName\": \"Blog Registration\"\n}"
response = http.request(request)
puts response.read_body{
"leadId": 651095960136641
}Path Parameters
Body
application/json
Specifies the type of activity being logged for the lead.
Accepted Values:
- Search: When the lead performs a search operation (e.g., filtering by property type like Single Family Home)
- Browse: When the lead views a property detail page
- Favorite: When the lead saves a property to favorites
- Request: When the lead submits a showing request for a property
- Submission: When the lead submits a form on website
Example:
"Search"
Search Text
Example:
"Search"
Url for web page
Example:
"https://lofty.com"
Preview picture url
Example:
"https://lofty.com/default.jpg"
created time in milliseconds
Example:
1747272300000
Lead property or mailing address details
Show child attributes
Show child attributes
Scheduled date about this showing request
The page name of the lead's submission(re-inquiry) page
Example:
"Blog Registration"
Response
200 - application/json
Successful operation.
Response containing the lead ID.
ID of the lead.
Example:
651095960136641
⌘I
Add activity
curl --request POST \
--url https://api.lofty.com/v1.0/leads/{leadId}/activity \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"type": "Search",
"text": "Search",
"link": "https://lofty.com",
"picture": "https://lofty.com/default.jpg",
"created": 1747272300000,
"listing": {
"price": 100000,
"state": "California",
"city": "New York",
"streetAddress": "22348 Regnart RD",
"zipCode": "25401",
"county": "<string>",
"propertyType": "Single Family Home",
"bedrooms": 3,
"bathrooms": 2,
"squareFeet": 100,
"lotSize": 26.33,
"parkingSpace": 1,
"floors": 1,
"mailAddress": true,
"id": 123,
"leadUserId": 123,
"listingId": "<string>",
"autoListingId": 123,
"label": "<string>",
"note": "<string>",
"listingStatus": "<string>",
"labelList": "<string>",
"pictureUrl": "<string>",
"siteListingUrl": "<string>",
"labelType": "<string>",
"priceMax": 10000000,
"priceMin": 100000
},
"scheduledDate": "<string>",
"pageName": "Blog Registration"
}
'import requests
url = "https://api.lofty.com/v1.0/leads/{leadId}/activity"
payload = {
"type": "Search",
"text": "Search",
"link": "https://lofty.com",
"picture": "https://lofty.com/default.jpg",
"created": 1747272300000,
"listing": {
"price": 100000,
"state": "California",
"city": "New York",
"streetAddress": "22348 Regnart RD",
"zipCode": "25401",
"county": "<string>",
"propertyType": "Single Family Home",
"bedrooms": 3,
"bathrooms": 2,
"squareFeet": 100,
"lotSize": 26.33,
"parkingSpace": 1,
"floors": 1,
"mailAddress": True,
"id": 123,
"leadUserId": 123,
"listingId": "<string>",
"autoListingId": 123,
"label": "<string>",
"note": "<string>",
"listingStatus": "<string>",
"labelList": "<string>",
"pictureUrl": "<string>",
"siteListingUrl": "<string>",
"labelType": "<string>",
"priceMax": 10000000,
"priceMin": 100000
},
"scheduledDate": "<string>",
"pageName": "Blog Registration"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
type: 'Search',
text: 'Search',
link: 'https://lofty.com',
picture: 'https://lofty.com/default.jpg',
created: 1747272300000,
listing: {
price: 100000,
state: 'California',
city: 'New York',
streetAddress: '22348 Regnart RD',
zipCode: '25401',
county: '<string>',
propertyType: 'Single Family Home',
bedrooms: 3,
bathrooms: 2,
squareFeet: 100,
lotSize: 26.33,
parkingSpace: 1,
floors: 1,
mailAddress: true,
id: 123,
leadUserId: 123,
listingId: '<string>',
autoListingId: 123,
label: '<string>',
note: '<string>',
listingStatus: '<string>',
labelList: '<string>',
pictureUrl: '<string>',
siteListingUrl: '<string>',
labelType: '<string>',
priceMax: 10000000,
priceMin: 100000
},
scheduledDate: '<string>',
pageName: 'Blog Registration'
})
};
fetch('https://api.lofty.com/v1.0/leads/{leadId}/activity', 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/v1.0/leads/{leadId}/activity",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'Search',
'text' => 'Search',
'link' => 'https://lofty.com',
'picture' => 'https://lofty.com/default.jpg',
'created' => 1747272300000,
'listing' => [
'price' => 100000,
'state' => 'California',
'city' => 'New York',
'streetAddress' => '22348 Regnart RD',
'zipCode' => '25401',
'county' => '<string>',
'propertyType' => 'Single Family Home',
'bedrooms' => 3,
'bathrooms' => 2,
'squareFeet' => 100,
'lotSize' => 26.33,
'parkingSpace' => 1,
'floors' => 1,
'mailAddress' => true,
'id' => 123,
'leadUserId' => 123,
'listingId' => '<string>',
'autoListingId' => 123,
'label' => '<string>',
'note' => '<string>',
'listingStatus' => '<string>',
'labelList' => '<string>',
'pictureUrl' => '<string>',
'siteListingUrl' => '<string>',
'labelType' => '<string>',
'priceMax' => 10000000,
'priceMin' => 100000
],
'scheduledDate' => '<string>',
'pageName' => 'Blog Registration'
]),
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/v1.0/leads/{leadId}/activity"
payload := strings.NewReader("{\n \"type\": \"Search\",\n \"text\": \"Search\",\n \"link\": \"https://lofty.com\",\n \"picture\": \"https://lofty.com/default.jpg\",\n \"created\": 1747272300000,\n \"listing\": {\n \"price\": 100000,\n \"state\": \"California\",\n \"city\": \"New York\",\n \"streetAddress\": \"22348 Regnart RD\",\n \"zipCode\": \"25401\",\n \"county\": \"<string>\",\n \"propertyType\": \"Single Family Home\",\n \"bedrooms\": 3,\n \"bathrooms\": 2,\n \"squareFeet\": 100,\n \"lotSize\": 26.33,\n \"parkingSpace\": 1,\n \"floors\": 1,\n \"mailAddress\": true,\n \"id\": 123,\n \"leadUserId\": 123,\n \"listingId\": \"<string>\",\n \"autoListingId\": 123,\n \"label\": \"<string>\",\n \"note\": \"<string>\",\n \"listingStatus\": \"<string>\",\n \"labelList\": \"<string>\",\n \"pictureUrl\": \"<string>\",\n \"siteListingUrl\": \"<string>\",\n \"labelType\": \"<string>\",\n \"priceMax\": 10000000,\n \"priceMin\": 100000\n },\n \"scheduledDate\": \"<string>\",\n \"pageName\": \"Blog Registration\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.lofty.com/v1.0/leads/{leadId}/activity")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"type\": \"Search\",\n \"text\": \"Search\",\n \"link\": \"https://lofty.com\",\n \"picture\": \"https://lofty.com/default.jpg\",\n \"created\": 1747272300000,\n \"listing\": {\n \"price\": 100000,\n \"state\": \"California\",\n \"city\": \"New York\",\n \"streetAddress\": \"22348 Regnart RD\",\n \"zipCode\": \"25401\",\n \"county\": \"<string>\",\n \"propertyType\": \"Single Family Home\",\n \"bedrooms\": 3,\n \"bathrooms\": 2,\n \"squareFeet\": 100,\n \"lotSize\": 26.33,\n \"parkingSpace\": 1,\n \"floors\": 1,\n \"mailAddress\": true,\n \"id\": 123,\n \"leadUserId\": 123,\n \"listingId\": \"<string>\",\n \"autoListingId\": 123,\n \"label\": \"<string>\",\n \"note\": \"<string>\",\n \"listingStatus\": \"<string>\",\n \"labelList\": \"<string>\",\n \"pictureUrl\": \"<string>\",\n \"siteListingUrl\": \"<string>\",\n \"labelType\": \"<string>\",\n \"priceMax\": 10000000,\n \"priceMin\": 100000\n },\n \"scheduledDate\": \"<string>\",\n \"pageName\": \"Blog Registration\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v1.0/leads/{leadId}/activity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"type\": \"Search\",\n \"text\": \"Search\",\n \"link\": \"https://lofty.com\",\n \"picture\": \"https://lofty.com/default.jpg\",\n \"created\": 1747272300000,\n \"listing\": {\n \"price\": 100000,\n \"state\": \"California\",\n \"city\": \"New York\",\n \"streetAddress\": \"22348 Regnart RD\",\n \"zipCode\": \"25401\",\n \"county\": \"<string>\",\n \"propertyType\": \"Single Family Home\",\n \"bedrooms\": 3,\n \"bathrooms\": 2,\n \"squareFeet\": 100,\n \"lotSize\": 26.33,\n \"parkingSpace\": 1,\n \"floors\": 1,\n \"mailAddress\": true,\n \"id\": 123,\n \"leadUserId\": 123,\n \"listingId\": \"<string>\",\n \"autoListingId\": 123,\n \"label\": \"<string>\",\n \"note\": \"<string>\",\n \"listingStatus\": \"<string>\",\n \"labelList\": \"<string>\",\n \"pictureUrl\": \"<string>\",\n \"siteListingUrl\": \"<string>\",\n \"labelType\": \"<string>\",\n \"priceMax\": 10000000,\n \"priceMin\": 100000\n },\n \"scheduledDate\": \"<string>\",\n \"pageName\": \"Blog Registration\"\n}"
response = http.request(request)
puts response.read_body{
"leadId": 651095960136641
}