Skip to main content
PATCH
/
v1
/
custom-fields
/
{identifier}
Update a custom field
curl --request PATCH \
  --url https://api.vendaze.com/v1/custom-fields/{identifier} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "label": "Federal Tax ID",
  "value": {
    "select_list": [
      {
        "key": "sl_option_a",
        "option": "Option A"
      },
      {
        "key": "sl_option_b",
        "option": "Option B"
      },
      {
        "key": "sl_option_c",
        "option": "Option C"
      }
    ]
  },
  "required": true,
  "show_people": true,
  "show_companies": false,
  "show_deals": true
}
'
import requests

url = "https://api.vendaze.com/v1/custom-fields/{identifier}"

payload = {
"label": "Federal Tax ID",
"value": { "select_list": [
{
"key": "sl_option_a",
"option": "Option A"
},
{
"key": "sl_option_b",
"option": "Option B"
},
{
"key": "sl_option_c",
"option": "Option C"
}
] },
"required": True,
"show_people": True,
"show_companies": False,
"show_deals": 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({
label: 'Federal Tax ID',
value: {
select_list: [
{key: 'sl_option_a', option: 'Option A'},
{key: 'sl_option_b', option: 'Option B'},
{key: 'sl_option_c', option: 'Option C'}
]
},
required: true,
show_people: true,
show_companies: false,
show_deals: true
})
};

fetch('https://api.vendaze.com/v1/custom-fields/{identifier}', 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.vendaze.com/v1/custom-fields/{identifier}",
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' => 'Federal Tax ID',
'value' => [
'select_list' => [
[
'key' => 'sl_option_a',
'option' => 'Option A'
],
[
'key' => 'sl_option_b',
'option' => 'Option B'
],
[
'key' => 'sl_option_c',
'option' => 'Option C'
]
]
],
'required' => true,
'show_people' => true,
'show_companies' => false,
'show_deals' => 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.vendaze.com/v1/custom-fields/{identifier}"

payload := strings.NewReader("{\n \"label\": \"Federal Tax ID\",\n \"value\": {\n \"select_list\": [\n {\n \"key\": \"sl_option_a\",\n \"option\": \"Option A\"\n },\n {\n \"key\": \"sl_option_b\",\n \"option\": \"Option B\"\n },\n {\n \"key\": \"sl_option_c\",\n \"option\": \"Option C\"\n }\n ]\n },\n \"required\": true,\n \"show_people\": true,\n \"show_companies\": false,\n \"show_deals\": 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.vendaze.com/v1/custom-fields/{identifier}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"Federal Tax ID\",\n \"value\": {\n \"select_list\": [\n {\n \"key\": \"sl_option_a\",\n \"option\": \"Option A\"\n },\n {\n \"key\": \"sl_option_b\",\n \"option\": \"Option B\"\n },\n {\n \"key\": \"sl_option_c\",\n \"option\": \"Option C\"\n }\n ]\n },\n \"required\": true,\n \"show_people\": true,\n \"show_companies\": false,\n \"show_deals\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.vendaze.com/v1/custom-fields/{identifier}")

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 \"label\": \"Federal Tax ID\",\n \"value\": {\n \"select_list\": [\n {\n \"key\": \"sl_option_a\",\n \"option\": \"Option A\"\n },\n {\n \"key\": \"sl_option_b\",\n \"option\": \"Option B\"\n },\n {\n \"key\": \"sl_option_c\",\n \"option\": \"Option C\"\n }\n ]\n },\n \"required\": true,\n \"show_people\": true,\n \"show_companies\": false,\n \"show_deals\": true\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "label": "Tax ID",
    "key": "tax_id",
    "value": {
      "select_list": [
        {
          "key": "sl_option_a",
          "option": "Option A"
        },
        {
          "key": "sl_option_b",
          "option": "Option B"
        }
      ]
    },
    "required": true,
    "show_people": true,
    "show_companies": true,
    "show_deals": true,
    "created_at": "2023-11-07T05:31:56Z"
  }
}
{
"error": {
"code": "bad_request",
"message": "Request body must be valid JSON.",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid Authorization header.",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}
{
"error": {
"code": "insufficient_scope",
"message": "This endpoint requires the 'webhooks:read' scope.",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}
{
"error": {
"code": "not_found",
"message": "Webhook not found.",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}
{
"error": {
"code": "validation_error",
"message": "Validation failed.",
"fields": {
"url": "url must use HTTPS.",
"events": "At least one event is required."
},
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}
{
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Try again in 60 seconds.",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}
{
"error": {
"code": "internal_error",
"message": "An unexpected error occurred.",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}

Authorizations

Authorization
string
header
required

OAuth 2.1 access token.

Path Parameters

identifier
string
required

Custom field id (UUID) or key (string). Both formats are accepted.

Body

application/json

All fields are optional. Only fields included in the body are modified.

label
string

New display label.

Required string length: 1 - 40
Example:

"Federal Tax ID"

type
enum<string>

New field type.

Available options:
text,
long_text,
select,
multi_select,
cpf,
cnpj,
date,
number,
link,
address
value
object

Updates the options for select and multi_select fields. Replaces the entire existing list. Must be omitted for all other field types.

Example:
{
"select_list": [
{
"key": "sl_option_a",
"option": "Option A"
},
{
"key": "sl_option_b",
"option": "Option B"
},
{
"key": "sl_option_c",
"option": "Option C"
}
]
}
required
boolean

Update required flag.

Example:

true

show_people
boolean

Update visibility on people records.

Example:

true

show_companies
boolean

Update visibility on company records.

Example:

false

show_deals
boolean

Update visibility on deal records.

Example:

true

Response

Custom field updated successfully.

data
object