Feature Areas
Create a Feature Area
Adds one neighborhood or city to the caller’s website as a Feature Area. Lofty generates its intro with AI (takes several seconds) and creates its intro, listing-search and market pages; detail and FAQ content and the cover picture are generated afterwards. Fails with 422001 when the same area already exists or the site has reached its Feature Area limit.
POST
/
v2.0
/
website
/
featureAreas
Create a Feature Area
curl --request POST \
--url https://api.lofty.com/v2.0/website/featureAreas \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"type": 4,
"city": "Irvine",
"state": "CA",
"neighborhood": "Woodbury",
"displayName": "<string>"
}
'import requests
url = "https://api.lofty.com/v2.0/website/featureAreas"
payload = {
"type": 4,
"city": "Irvine",
"state": "CA",
"neighborhood": "Woodbury",
"displayName": "<string>"
}
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: 4,
city: 'Irvine',
state: 'CA',
neighborhood: 'Woodbury',
displayName: '<string>'
})
};
fetch('https://api.lofty.com/v2.0/website/featureAreas', 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/website/featureAreas",
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' => 4,
'city' => 'Irvine',
'state' => 'CA',
'neighborhood' => 'Woodbury',
'displayName' => '<string>'
]),
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/website/featureAreas"
payload := strings.NewReader("{\n \"type\": 4,\n \"city\": \"Irvine\",\n \"state\": \"CA\",\n \"neighborhood\": \"Woodbury\",\n \"displayName\": \"<string>\"\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/v2.0/website/featureAreas")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"type\": 4,\n \"city\": \"Irvine\",\n \"state\": \"CA\",\n \"neighborhood\": \"Woodbury\",\n \"displayName\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v2.0/website/featureAreas")
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\": 4,\n \"city\": \"Irvine\",\n \"state\": \"CA\",\n \"neighborhood\": \"Woodbury\",\n \"displayName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyBody
application/json
A neighborhood or city to add as a Feature Area (community page) on the caller's website.
Response
Success. {items: [...]} with the created Feature Area.
⌘I
Create a Feature Area
curl --request POST \
--url https://api.lofty.com/v2.0/website/featureAreas \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"type": 4,
"city": "Irvine",
"state": "CA",
"neighborhood": "Woodbury",
"displayName": "<string>"
}
'import requests
url = "https://api.lofty.com/v2.0/website/featureAreas"
payload = {
"type": 4,
"city": "Irvine",
"state": "CA",
"neighborhood": "Woodbury",
"displayName": "<string>"
}
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: 4,
city: 'Irvine',
state: 'CA',
neighborhood: 'Woodbury',
displayName: '<string>'
})
};
fetch('https://api.lofty.com/v2.0/website/featureAreas', 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/website/featureAreas",
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' => 4,
'city' => 'Irvine',
'state' => 'CA',
'neighborhood' => 'Woodbury',
'displayName' => '<string>'
]),
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/website/featureAreas"
payload := strings.NewReader("{\n \"type\": 4,\n \"city\": \"Irvine\",\n \"state\": \"CA\",\n \"neighborhood\": \"Woodbury\",\n \"displayName\": \"<string>\"\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/v2.0/website/featureAreas")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"type\": 4,\n \"city\": \"Irvine\",\n \"state\": \"CA\",\n \"neighborhood\": \"Woodbury\",\n \"displayName\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v2.0/website/featureAreas")
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\": 4,\n \"city\": \"Irvine\",\n \"state\": \"CA\",\n \"neighborhood\": \"Woodbury\",\n \"displayName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body