Settings
Add Custom Field
Creates a new lead-level custom field on the caller’s team.
Notes:
- attributeName is required and is trimmed; empty names are rejected.
- attributeType is required. Supported types: text, number, date, anniversary_date, single_select, multi_select, percentage, currency.
- anniversary_date: a date field that recurs annually (e.g. birthdays, work anniversaries). Accepts the same date format as date.
- The response body is a plain string message.
POST
/
v1.0
/
teamFeatures
/
custom-field
Add Custom Field
curl --request POST \
--url https://api.lofty.com/v1.0/teamFeatures/custom-field \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"attributeName": "<string>",
"attributeType": "number, text, date, anniversary_date, single_select, multi_select, percentage, currency",
"value": "<string>",
"params": "<string>"
}
'import requests
url = "https://api.lofty.com/v1.0/teamFeatures/custom-field"
payload = {
"attributeName": "<string>",
"attributeType": "number, text, date, anniversary_date, single_select, multi_select, percentage, currency",
"value": "<string>",
"params": "<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({
attributeName: '<string>',
attributeType: 'number, text, date, anniversary_date, single_select, multi_select, percentage, currency',
value: '<string>',
params: '<string>'
})
};
fetch('https://api.lofty.com/v1.0/teamFeatures/custom-field', 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/teamFeatures/custom-field",
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([
'attributeName' => '<string>',
'attributeType' => 'number, text, date, anniversary_date, single_select, multi_select, percentage, currency',
'value' => '<string>',
'params' => '<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/v1.0/teamFeatures/custom-field"
payload := strings.NewReader("{\n \"attributeName\": \"<string>\",\n \"attributeType\": \"number, text, date, anniversary_date, single_select, multi_select, percentage, currency\",\n \"value\": \"<string>\",\n \"params\": \"<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/v1.0/teamFeatures/custom-field")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"attributeName\": \"<string>\",\n \"attributeType\": \"number, text, date, anniversary_date, single_select, multi_select, percentage, currency\",\n \"value\": \"<string>\",\n \"params\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v1.0/teamFeatures/custom-field")
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 \"attributeName\": \"<string>\",\n \"attributeType\": \"number, text, date, anniversary_date, single_select, multi_select, percentage, currency\",\n \"value\": \"<string>\",\n \"params\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body"success""<string>""<string>""<string>"Body
application/json
User customized field
The name of this custom field
The type of the field
Example:
"number, text, date, anniversary_date, single_select, multi_select, percentage, currency"
The content of the field for lead, value for multi-select,such as "["item1","item2\s",...]" .It's unnecessary when adding a new custom field for team
options for select, such as {"option":["item1","item2",...]}
Response
Custom field created.
The response is of type string.
Example:
"success"
⌘I
Add Custom Field
curl --request POST \
--url https://api.lofty.com/v1.0/teamFeatures/custom-field \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"attributeName": "<string>",
"attributeType": "number, text, date, anniversary_date, single_select, multi_select, percentage, currency",
"value": "<string>",
"params": "<string>"
}
'import requests
url = "https://api.lofty.com/v1.0/teamFeatures/custom-field"
payload = {
"attributeName": "<string>",
"attributeType": "number, text, date, anniversary_date, single_select, multi_select, percentage, currency",
"value": "<string>",
"params": "<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({
attributeName: '<string>',
attributeType: 'number, text, date, anniversary_date, single_select, multi_select, percentage, currency',
value: '<string>',
params: '<string>'
})
};
fetch('https://api.lofty.com/v1.0/teamFeatures/custom-field', 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/teamFeatures/custom-field",
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([
'attributeName' => '<string>',
'attributeType' => 'number, text, date, anniversary_date, single_select, multi_select, percentage, currency',
'value' => '<string>',
'params' => '<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/v1.0/teamFeatures/custom-field"
payload := strings.NewReader("{\n \"attributeName\": \"<string>\",\n \"attributeType\": \"number, text, date, anniversary_date, single_select, multi_select, percentage, currency\",\n \"value\": \"<string>\",\n \"params\": \"<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/v1.0/teamFeatures/custom-field")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"attributeName\": \"<string>\",\n \"attributeType\": \"number, text, date, anniversary_date, single_select, multi_select, percentage, currency\",\n \"value\": \"<string>\",\n \"params\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v1.0/teamFeatures/custom-field")
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 \"attributeName\": \"<string>\",\n \"attributeType\": \"number, text, date, anniversary_date, single_select, multi_select, percentage, currency\",\n \"value\": \"<string>\",\n \"params\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body"success""<string>""<string>""<string>"