curl --request PATCH \
--url https://api.assembly.com/v1/custom-fields/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"entityType": "client",
"name": "Account tier",
"options": [
{
"label": "High priority",
"id": "option-f1a2b3c4-d5e6-47a8-9b0c-1d2e3f4a5b6c"
}
],
"type": "multiSelect"
}
'import requests
url = "https://api.assembly.com/v1/custom-fields/{id}"
payload = {
"entityType": "client",
"name": "Account tier",
"options": [
{
"label": "High priority",
"id": "option-f1a2b3c4-d5e6-47a8-9b0c-1d2e3f4a5b6c"
}
],
"type": "multiSelect"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entityType: 'client',
name: 'Account tier',
options: [{label: 'High priority', id: 'option-f1a2b3c4-d5e6-47a8-9b0c-1d2e3f4a5b6c'}],
type: 'multiSelect'
})
};
fetch('https://api.assembly.com/v1/custom-fields/{id}', 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.assembly.com/v1/custom-fields/{id}",
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([
'entityType' => 'client',
'name' => 'Account tier',
'options' => [
[
'label' => 'High priority',
'id' => 'option-f1a2b3c4-d5e6-47a8-9b0c-1d2e3f4a5b6c'
]
],
'type' => 'multiSelect'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.assembly.com/v1/custom-fields/{id}"
payload := strings.NewReader("{\n \"entityType\": \"client\",\n \"name\": \"Account tier\",\n \"options\": [\n {\n \"label\": \"High priority\",\n \"id\": \"option-f1a2b3c4-d5e6-47a8-9b0c-1d2e3f4a5b6c\"\n }\n ],\n \"type\": \"multiSelect\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<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.assembly.com/v1/custom-fields/{id}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"entityType\": \"client\",\n \"name\": \"Account tier\",\n \"options\": [\n {\n \"label\": \"High priority\",\n \"id\": \"option-f1a2b3c4-d5e6-47a8-9b0c-1d2e3f4a5b6c\"\n }\n ],\n \"type\": \"multiSelect\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.assembly.com/v1/custom-fields/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entityType\": \"client\",\n \"name\": \"Account tier\",\n \"options\": [\n {\n \"label\": \"High priority\",\n \"id\": \"option-f1a2b3c4-d5e6-47a8-9b0c-1d2e3f4a5b6c\"\n }\n ],\n \"type\": \"multiSelect\"\n}"
response = http.request(request)
puts response.read_body{
"entityType": "client",
"id": "d8e8fca2-dc0f-4f3b-9a2e-1f6f3c2b7a10",
"key": "accountTier",
"name": "Account tier",
"object": "customField",
"options": [
{
"color": "rgba(204, 0, 0, 1)",
"id": "f1a2b3c4-d5e6-47a8-9b0c-1d2e3f4a5b6c",
"key": "highPriority",
"label": "High priority",
"object": "customFieldOption"
}
],
"order": 0,
"type": "multiSelect"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}Update a custom field
Renames a custom field and/or replaces the option set of a multiSelect custom field. A custom field’s key, type, and entityType cannot be changed; supplying a type or entityType that differs from the field’s current value is rejected.
curl --request PATCH \
--url https://api.assembly.com/v1/custom-fields/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"entityType": "client",
"name": "Account tier",
"options": [
{
"label": "High priority",
"id": "option-f1a2b3c4-d5e6-47a8-9b0c-1d2e3f4a5b6c"
}
],
"type": "multiSelect"
}
'import requests
url = "https://api.assembly.com/v1/custom-fields/{id}"
payload = {
"entityType": "client",
"name": "Account tier",
"options": [
{
"label": "High priority",
"id": "option-f1a2b3c4-d5e6-47a8-9b0c-1d2e3f4a5b6c"
}
],
"type": "multiSelect"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entityType: 'client',
name: 'Account tier',
options: [{label: 'High priority', id: 'option-f1a2b3c4-d5e6-47a8-9b0c-1d2e3f4a5b6c'}],
type: 'multiSelect'
})
};
fetch('https://api.assembly.com/v1/custom-fields/{id}', 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.assembly.com/v1/custom-fields/{id}",
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([
'entityType' => 'client',
'name' => 'Account tier',
'options' => [
[
'label' => 'High priority',
'id' => 'option-f1a2b3c4-d5e6-47a8-9b0c-1d2e3f4a5b6c'
]
],
'type' => 'multiSelect'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.assembly.com/v1/custom-fields/{id}"
payload := strings.NewReader("{\n \"entityType\": \"client\",\n \"name\": \"Account tier\",\n \"options\": [\n {\n \"label\": \"High priority\",\n \"id\": \"option-f1a2b3c4-d5e6-47a8-9b0c-1d2e3f4a5b6c\"\n }\n ],\n \"type\": \"multiSelect\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<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.assembly.com/v1/custom-fields/{id}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"entityType\": \"client\",\n \"name\": \"Account tier\",\n \"options\": [\n {\n \"label\": \"High priority\",\n \"id\": \"option-f1a2b3c4-d5e6-47a8-9b0c-1d2e3f4a5b6c\"\n }\n ],\n \"type\": \"multiSelect\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.assembly.com/v1/custom-fields/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entityType\": \"client\",\n \"name\": \"Account tier\",\n \"options\": [\n {\n \"label\": \"High priority\",\n \"id\": \"option-f1a2b3c4-d5e6-47a8-9b0c-1d2e3f4a5b6c\"\n }\n ],\n \"type\": \"multiSelect\"\n}"
response = http.request(request)
puts response.read_body{
"entityType": "client",
"id": "d8e8fca2-dc0f-4f3b-9a2e-1f6f3c2b7a10",
"key": "accountTier",
"name": "Account tier",
"object": "customField",
"options": [
{
"color": "rgba(204, 0, 0, 1)",
"id": "f1a2b3c4-d5e6-47a8-9b0c-1d2e3f4a5b6c",
"key": "highPriority",
"label": "High priority",
"object": "customFieldOption"
}
],
"order": 0,
"type": "multiSelect"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}Authorizations
Path Parameters
Custom field ID
Body
Custom field updates
EntityType, if provided, must match the field's current entityType; it cannot be changed.
client, company "client"
Name renames the custom field; omit to leave the name unchanged.
"Account tier"
Options replaces the option set of a multiSelect custom field; omit to leave options unchanged. Any existing option not referenced by id is removed. Only valid for multiSelect custom fields.
Show child attributes
Show child attributes
Type, if provided, must match the field's current type; the field's type cannot be changed.
text, number, email, url, phoneNumber, address, multiSelect "multiSelect"
Response
OK
EntityType is the entity the custom field belongs to.
client, company "client"
ID is the unique identifier of the custom field.
"d8e8fca2-dc0f-4f3b-9a2e-1f6f3c2b7a10"
Key is a "human-readable" alternative to ID, uniqueness must be enforced on this identifier
"accountTier"
Name is the display name of the custom field.
"Account tier"
Object is the resource type discriminator.
"customField"
Options are the selectable values; only present for multiSelect fields.
Show child attributes
Show child attributes
Order is the position of the custom field relative to others of the same entity type.
0
Type is the data type of the custom field.
text, number, email, url, phoneNumber, address, multiSelect "multiSelect"