Update a custom field
curl --request PATCH \
--url https://api.tented.ai/v1/contact-fields/{fieldDefinitionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "<string>",
"description": "<string>",
"is_editable": true,
"show_in_people_list_default": true
}
'import requests
url = "https://api.tented.ai/v1/contact-fields/{fieldDefinitionId}"
payload = {
"display_name": "<string>",
"description": "<string>",
"is_editable": True,
"show_in_people_list_default": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
display_name: '<string>',
description: '<string>',
is_editable: true,
show_in_people_list_default: true
})
};
fetch('https://api.tented.ai/v1/contact-fields/{fieldDefinitionId}', 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.tented.ai/v1/contact-fields/{fieldDefinitionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => '<string>',
'description' => '<string>',
'is_editable' => true,
'show_in_people_list_default' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.tented.ai/v1/contact-fields/{fieldDefinitionId}"
payload := strings.NewReader("{\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"is_editable\": true,\n \"show_in_people_list_default\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.tented.ai/v1/contact-fields/{fieldDefinitionId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"is_editable\": true,\n \"show_in_people_list_default\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tented.ai/v1/contact-fields/{fieldDefinitionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"is_editable\": true,\n \"show_in_people_list_default\": true\n}"
response = http.request(request)
puts response.read_body{
"type": "standard",
"api_name": "<string>",
"display_name": "<string>",
"value_type": "string",
"is_editable": true,
"status": "active",
"field_definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"management_mode": "org_managed",
"provenance_kind": "manual_ui",
"provenance_provider": "<string>",
"provenance_reference": "<string>",
"created_by_user_id": "<string>",
"created_from_import_session_id": "<string>",
"show_in_people_list_default": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}Contact Fields
Update a custom field
Update a custom field’s display name, description, editability, default list visibility, or status. At least one property must be provided.
- Archive / restore: set
status: "archived"to archive a field (its values are retained but it stops appearing in default field lists), orstatus: "active"to restore it. - System fields are read-only — passing a standard field name (e.g.
email) instead of a custom field’s UUID returns400(System fields are read-only). Theapi_nameandvalue_typeof a custom field cannot be changed. - Integration-managed fields reject
display_name,description, andstatusedits (400); onlyis_editableandshow_in_people_list_defaultcan be changed.
PATCH
/
v1
/
contact-fields
/
{fieldDefinitionId}
Update a custom field
curl --request PATCH \
--url https://api.tented.ai/v1/contact-fields/{fieldDefinitionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "<string>",
"description": "<string>",
"is_editable": true,
"show_in_people_list_default": true
}
'import requests
url = "https://api.tented.ai/v1/contact-fields/{fieldDefinitionId}"
payload = {
"display_name": "<string>",
"description": "<string>",
"is_editable": True,
"show_in_people_list_default": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
display_name: '<string>',
description: '<string>',
is_editable: true,
show_in_people_list_default: true
})
};
fetch('https://api.tented.ai/v1/contact-fields/{fieldDefinitionId}', 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.tented.ai/v1/contact-fields/{fieldDefinitionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => '<string>',
'description' => '<string>',
'is_editable' => true,
'show_in_people_list_default' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.tented.ai/v1/contact-fields/{fieldDefinitionId}"
payload := strings.NewReader("{\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"is_editable\": true,\n \"show_in_people_list_default\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.tented.ai/v1/contact-fields/{fieldDefinitionId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"is_editable\": true,\n \"show_in_people_list_default\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tented.ai/v1/contact-fields/{fieldDefinitionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"is_editable\": true,\n \"show_in_people_list_default\": true\n}"
response = http.request(request)
puts response.read_body{
"type": "standard",
"api_name": "<string>",
"display_name": "<string>",
"value_type": "string",
"is_editable": true,
"status": "active",
"field_definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"management_mode": "org_managed",
"provenance_kind": "manual_ui",
"provenance_provider": "<string>",
"provenance_reference": "<string>",
"created_by_user_id": "<string>",
"created_from_import_session_id": "<string>",
"show_in_people_list_default": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}Authorizations
Path Parameters
Body
application/json
At least one property is required.
Response
The updated custom field definition.
A contact field definition. Standard fields include only the six required properties; custom fields include the full definition metadata.