Update custom contact field
curl --request PATCH \
--url https://api.withallo.com/v2/api/crm/attributes/{key} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "Lead temperature",
"options": [
{
"key": "hot",
"label": "Hot"
},
{
"label": "Warm"
},
{
"key": "cold",
"label": "Cold"
}
]
}
'import requests
url = "https://api.withallo.com/v2/api/crm/attributes/{key}"
payload = {
"label": "Lead temperature",
"options": [
{
"key": "hot",
"label": "Hot"
},
{ "label": "Warm" },
{
"key": "cold",
"label": "Cold"
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: 'Lead temperature',
options: [{key: 'hot', label: 'Hot'}, {label: 'Warm'}, {key: 'cold', label: 'Cold'}]
})
};
fetch('https://api.withallo.com/v2/api/crm/attributes/{key}', 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.withallo.com/v2/api/crm/attributes/{key}",
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([
'label' => 'Lead temperature',
'options' => [
[
'key' => 'hot',
'label' => 'Hot'
],
[
'label' => 'Warm'
],
[
'key' => 'cold',
'label' => 'Cold'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.withallo.com/v2/api/crm/attributes/{key}"
payload := strings.NewReader("{\n \"label\": \"Lead temperature\",\n \"options\": [\n {\n \"key\": \"hot\",\n \"label\": \"Hot\"\n },\n {\n \"label\": \"Warm\"\n },\n {\n \"key\": \"cold\",\n \"label\": \"Cold\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.withallo.com/v2/api/crm/attributes/{key}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"Lead temperature\",\n \"options\": [\n {\n \"key\": \"hot\",\n \"label\": \"Hot\"\n },\n {\n \"label\": \"Warm\"\n },\n {\n \"key\": \"cold\",\n \"label\": \"Cold\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/crm/attributes/{key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"Lead temperature\",\n \"options\": [\n {\n \"key\": \"hot\",\n \"label\": \"Hot\"\n },\n {\n \"label\": \"Warm\"\n },\n {\n \"key\": \"cold\",\n \"label\": \"Cold\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"key": "lead_status",
"label": "Lead temperature",
"type": "DROPDOWN",
"options": [
{
"key": "hot",
"label": "Hot"
},
{
"key": "warm",
"label": "Warm"
},
{
"key": "cold",
"label": "Cold"
}
],
"source": "allo"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}Custom fields
Update custom field
Partially updates a custom field on people: only the fields you send change. key and type cannot be changed. Fields synced from a CRM integration cannot be edited.
PATCH
/
v2
/
api
/
crm
/
attributes
/
{key}
Update custom contact field
curl --request PATCH \
--url https://api.withallo.com/v2/api/crm/attributes/{key} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "Lead temperature",
"options": [
{
"key": "hot",
"label": "Hot"
},
{
"label": "Warm"
},
{
"key": "cold",
"label": "Cold"
}
]
}
'import requests
url = "https://api.withallo.com/v2/api/crm/attributes/{key}"
payload = {
"label": "Lead temperature",
"options": [
{
"key": "hot",
"label": "Hot"
},
{ "label": "Warm" },
{
"key": "cold",
"label": "Cold"
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: 'Lead temperature',
options: [{key: 'hot', label: 'Hot'}, {label: 'Warm'}, {key: 'cold', label: 'Cold'}]
})
};
fetch('https://api.withallo.com/v2/api/crm/attributes/{key}', 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.withallo.com/v2/api/crm/attributes/{key}",
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([
'label' => 'Lead temperature',
'options' => [
[
'key' => 'hot',
'label' => 'Hot'
],
[
'label' => 'Warm'
],
[
'key' => 'cold',
'label' => 'Cold'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.withallo.com/v2/api/crm/attributes/{key}"
payload := strings.NewReader("{\n \"label\": \"Lead temperature\",\n \"options\": [\n {\n \"key\": \"hot\",\n \"label\": \"Hot\"\n },\n {\n \"label\": \"Warm\"\n },\n {\n \"key\": \"cold\",\n \"label\": \"Cold\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.withallo.com/v2/api/crm/attributes/{key}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"Lead temperature\",\n \"options\": [\n {\n \"key\": \"hot\",\n \"label\": \"Hot\"\n },\n {\n \"label\": \"Warm\"\n },\n {\n \"key\": \"cold\",\n \"label\": \"Cold\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/crm/attributes/{key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"Lead temperature\",\n \"options\": [\n {\n \"key\": \"hot\",\n \"label\": \"Hot\"\n },\n {\n \"label\": \"Warm\"\n },\n {\n \"key\": \"cold\",\n \"label\": \"Cold\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"key": "lead_status",
"label": "Lead temperature",
"type": "DROPDOWN",
"options": [
{
"key": "hot",
"label": "Hot"
},
{
"key": "warm",
"label": "Warm"
},
{
"key": "cold",
"label": "Cold"
}
],
"source": "allo"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}Required scope:
CRM_WRITEkey and type cannot be changed.
Body fields
| Field | Type | Description |
|---|---|---|
label | string | New display name |
description | string | Description of the field. A blank value clears it |
options | array | Replaces the full option list with { label, key? } objects. DROPDOWN fields only |
Renaming options
Option keys stay stable. To rename an option, send its currentkey with the new label. An option sent without a matching key is treated as new and gets a key derived from its label. Options missing from the list are removed.
Fields synced from a CRM
A field whosesource is not allo is managed by your CRM integration and cannot be edited. Any update returns 409 ATTRIBUTE_MANAGED_BY_INTEGRATION. Built-in fields such as name or company return 400 ATTRIBUTE_BUILT_IN.
Response
Returns200 with the updated field, in the same shape as List custom fields.
{
"data": {
"key": "lead_status",
"label": "Lead temperature",
"type": "DROPDOWN",
"options": [
{ "key": "hot", "label": "Hot" },
{ "key": "warm", "label": "Warm" },
{ "key": "cold", "label": "Cold" }
],
"source": "allo"
}
}
Errors
| Status | Code | When |
|---|---|---|
400 | ATTRIBUTE_LABEL_INVALID | label is blank, longer than 255 characters, or has no letter or digit |
400 | ATTRIBUTE_OPTION_INVALID | An option label is blank, longer than 255 characters or duplicated |
400 | ATTRIBUTE_OPTIONS_NOT_SUPPORTED | options sent for a field that is not DROPDOWN |
400 | ATTRIBUTE_BUILT_IN | The key is a built-in field, not a custom field |
403 | API_KEY_INSUFFICIENT_SCOPE | The key does not hold CRM_WRITE |
404 | TEAM_NOT_FOUND | The workspace is not on the new contact model |
404 | ATTRIBUTE_NOT_FOUND | No field with this key, or the field was deleted |
409 | ATTRIBUTE_MANAGED_BY_INTEGRATION | The field is managed by a CRM integration |
Authorizations
Path Parameters
Field key, as returned by the list endpoint
Example:
"lead_status"
Body
application/json
All fields are optional
Response
The updated field
A custom field on people
Show child attributes
Show child attributes
Was this page helpful?