Update a group custom field
curl --request PATCH \
--url https://api.folk.app/v1/groups/{groupId}/custom-fields/{entityType}/{customFieldName} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"config": {
"format": "currency",
"currency": "EUR",
"decimals": 2
},
"addOptions": [
{
"label": "<string>",
"color": "#5738ff"
}
],
"removeOptions": [
"<string>"
],
"updateOptions": [
{
"id": "<string>",
"label": "<string>",
"color": "#5738ff"
}
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
config: {format: 'currency', currency: 'EUR', decimals: 2},
addOptions: [{label: '<string>', color: '#5738ff'}],
removeOptions: ['<string>'],
updateOptions: [{id: '<string>', label: '<string>', color: '#5738ff'}]
})
};
fetch('https://api.folk.app/v1/groups/{groupId}/custom-fields/{entityType}/{customFieldName}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.folk.app/v1/groups/{groupId}/custom-fields/{entityType}/{customFieldName}"
payload = {
"name": "<string>",
"config": {
"format": "currency",
"currency": "EUR",
"decimals": 2
},
"addOptions": [
{
"label": "<string>",
"color": "#5738ff"
}
],
"removeOptions": ["<string>"],
"updateOptions": [
{
"id": "<string>",
"label": "<string>",
"color": "#5738ff"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://api.folk.app/v1/groups/{groupId}/custom-fields/{entityType}/{customFieldName}")
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 \"name\": \"<string>\",\n \"config\": {\n \"format\": \"currency\",\n \"currency\": \"EUR\",\n \"decimals\": 2\n },\n \"addOptions\": [\n {\n \"label\": \"<string>\",\n \"color\": \"#5738ff\"\n }\n ],\n \"removeOptions\": [\n \"<string>\"\n ],\n \"updateOptions\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"color\": \"#5738ff\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.folk.app/v1/groups/{groupId}/custom-fields/{entityType}/{customFieldName}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"config\": {\n \"format\": \"currency\",\n \"currency\": \"EUR\",\n \"decimals\": 2\n },\n \"addOptions\": [\n {\n \"label\": \"<string>\",\n \"color\": \"#5738ff\"\n }\n ],\n \"removeOptions\": [\n \"<string>\"\n ],\n \"updateOptions\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"color\": \"#5738ff\"\n }\n ]\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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.folk.app/v1/groups/{groupId}/custom-fields/{entityType}/{customFieldName}",
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([
'name' => '<string>',
'config' => [
'format' => 'currency',
'currency' => 'EUR',
'decimals' => 2
],
'addOptions' => [
[
'label' => '<string>',
'color' => '#5738ff'
]
],
'removeOptions' => [
'<string>'
],
'updateOptions' => [
[
'id' => '<string>',
'label' => '<string>',
'color' => '#5738ff'
]
]
]),
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;
}{
"data": {
"item": {
"name": "Status",
"type": "singleSelect",
"options": [
{
"id": "gcfo_bc984b3f-0386-434d-82d7-a91eb6badd71",
"label": "Active",
"color": "#ffffff"
},
{
"id": "gcfo_28cf7f0a-fb0a-4b6b-9d47-3f5f2e3f1a3f",
"label": "Inactive",
"color": "#000000"
}
]
},
"nextLink": "https://api.folk.app/groups/grp_bc984b3f-0386-434d-82d7-a91eb6badd71/custom-fields/person/Newname"
}
}{
"error": {
"code": "INVALID_REQUEST",
"message": "The request was invalid.",
"documentationUrl": "https://developer.folk.app/api-reference/errors#bad-request",
"requestId": "123e4567-e89b-12d3-a456-426614174000",
"timestamp": "2025-10-01T12:00:00Z"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "No valid API key provided.",
"documentationUrl": "https://developer.folk.app/api-reference/errors#unauthorized",
"requestId": "123e4567-e89b-12d3-a456-426614174000",
"timestamp": "2025-10-01T12:00:00Z"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "The API key doesn’t have permissions to perform the request.",
"documentationUrl": "https://developer.folk.app/api-reference/errors#forbidden",
"requestId": "123e4567-e89b-12d3-a456-426614174000",
"timestamp": "2025-10-01T12:00:00Z"
}
}{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "The requested resource was not found.",
"documentationUrl": "https://developer.folk.app/api-reference/errors#not-found",
"requestId": "123e4567-e89b-12d3-a456-426614174000",
"timestamp": "2025-10-01T12:00:00Z"
}
}{
"error": {
"code": "UNPROCESSABLE_ENTITY",
"message": "Invalid query parameters",
"documentationUrl": "https://developer.folk.app/api-reference/errors#unprocessable-entity",
"details": {
"issues": [
{
"code": "too_small",
"minimum": 1,
"type": "number",
"inclusive": true,
"exact": false,
"message": "Number must be greater than or equal to 1",
"path": [
"limit"
]
}
]
},
"requestId": "123e4567-e89b-12d3-a456-426614174000",
"timestamp": "2025-10-01T12:00:00Z"
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "The rate limit has been exceeded.",
"documentationUrl": "https://developer.folk.app/api-reference/errors#rate-limiting",
"requestId": "123e4567-e89b-12d3-a456-426614174000",
"timestamp": "2025-10-01T12:00:00Z",
"details": {
"limit": 1000,
"remaining": 0,
"retryAfter": "2025-10-01T12:00:00Z"
}
}
}{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "An internal server error occurred.",
"documentationUrl": "https://developer.folk.app/api-reference/errors#internal-server-error",
"requestId": "123e4567-e89b-12d3-a456-426614174000",
"timestamp": "2025-10-01T12:00:00Z"
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "The service is currently unavailable.",
"documentationUrl": "https://developer.folk.app/api-reference/errors#service-unavailable",
"requestId": "123e4567-e89b-12d3-a456-426614174000",
"timestamp": "2025-10-01T12:00:00Z"
}
}Group custom fields
Update a group custom field
Updates a group custom field for an entity type.
PATCH
/
v1
/
groups
/
{groupId}
/
custom-fields
/
{entityType}
/
{customFieldName}
Update a group custom field
curl --request PATCH \
--url https://api.folk.app/v1/groups/{groupId}/custom-fields/{entityType}/{customFieldName} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"config": {
"format": "currency",
"currency": "EUR",
"decimals": 2
},
"addOptions": [
{
"label": "<string>",
"color": "#5738ff"
}
],
"removeOptions": [
"<string>"
],
"updateOptions": [
{
"id": "<string>",
"label": "<string>",
"color": "#5738ff"
}
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
config: {format: 'currency', currency: 'EUR', decimals: 2},
addOptions: [{label: '<string>', color: '#5738ff'}],
removeOptions: ['<string>'],
updateOptions: [{id: '<string>', label: '<string>', color: '#5738ff'}]
})
};
fetch('https://api.folk.app/v1/groups/{groupId}/custom-fields/{entityType}/{customFieldName}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.folk.app/v1/groups/{groupId}/custom-fields/{entityType}/{customFieldName}"
payload = {
"name": "<string>",
"config": {
"format": "currency",
"currency": "EUR",
"decimals": 2
},
"addOptions": [
{
"label": "<string>",
"color": "#5738ff"
}
],
"removeOptions": ["<string>"],
"updateOptions": [
{
"id": "<string>",
"label": "<string>",
"color": "#5738ff"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://api.folk.app/v1/groups/{groupId}/custom-fields/{entityType}/{customFieldName}")
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 \"name\": \"<string>\",\n \"config\": {\n \"format\": \"currency\",\n \"currency\": \"EUR\",\n \"decimals\": 2\n },\n \"addOptions\": [\n {\n \"label\": \"<string>\",\n \"color\": \"#5738ff\"\n }\n ],\n \"removeOptions\": [\n \"<string>\"\n ],\n \"updateOptions\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"color\": \"#5738ff\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.folk.app/v1/groups/{groupId}/custom-fields/{entityType}/{customFieldName}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"config\": {\n \"format\": \"currency\",\n \"currency\": \"EUR\",\n \"decimals\": 2\n },\n \"addOptions\": [\n {\n \"label\": \"<string>\",\n \"color\": \"#5738ff\"\n }\n ],\n \"removeOptions\": [\n \"<string>\"\n ],\n \"updateOptions\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"color\": \"#5738ff\"\n }\n ]\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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.folk.app/v1/groups/{groupId}/custom-fields/{entityType}/{customFieldName}",
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([
'name' => '<string>',
'config' => [
'format' => 'currency',
'currency' => 'EUR',
'decimals' => 2
],
'addOptions' => [
[
'label' => '<string>',
'color' => '#5738ff'
]
],
'removeOptions' => [
'<string>'
],
'updateOptions' => [
[
'id' => '<string>',
'label' => '<string>',
'color' => '#5738ff'
]
]
]),
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;
}{
"data": {
"item": {
"name": "Status",
"type": "singleSelect",
"options": [
{
"id": "gcfo_bc984b3f-0386-434d-82d7-a91eb6badd71",
"label": "Active",
"color": "#ffffff"
},
{
"id": "gcfo_28cf7f0a-fb0a-4b6b-9d47-3f5f2e3f1a3f",
"label": "Inactive",
"color": "#000000"
}
]
},
"nextLink": "https://api.folk.app/groups/grp_bc984b3f-0386-434d-82d7-a91eb6badd71/custom-fields/person/Newname"
}
}{
"error": {
"code": "INVALID_REQUEST",
"message": "The request was invalid.",
"documentationUrl": "https://developer.folk.app/api-reference/errors#bad-request",
"requestId": "123e4567-e89b-12d3-a456-426614174000",
"timestamp": "2025-10-01T12:00:00Z"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "No valid API key provided.",
"documentationUrl": "https://developer.folk.app/api-reference/errors#unauthorized",
"requestId": "123e4567-e89b-12d3-a456-426614174000",
"timestamp": "2025-10-01T12:00:00Z"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "The API key doesn’t have permissions to perform the request.",
"documentationUrl": "https://developer.folk.app/api-reference/errors#forbidden",
"requestId": "123e4567-e89b-12d3-a456-426614174000",
"timestamp": "2025-10-01T12:00:00Z"
}
}{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "The requested resource was not found.",
"documentationUrl": "https://developer.folk.app/api-reference/errors#not-found",
"requestId": "123e4567-e89b-12d3-a456-426614174000",
"timestamp": "2025-10-01T12:00:00Z"
}
}{
"error": {
"code": "UNPROCESSABLE_ENTITY",
"message": "Invalid query parameters",
"documentationUrl": "https://developer.folk.app/api-reference/errors#unprocessable-entity",
"details": {
"issues": [
{
"code": "too_small",
"minimum": 1,
"type": "number",
"inclusive": true,
"exact": false,
"message": "Number must be greater than or equal to 1",
"path": [
"limit"
]
}
]
},
"requestId": "123e4567-e89b-12d3-a456-426614174000",
"timestamp": "2025-10-01T12:00:00Z"
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "The rate limit has been exceeded.",
"documentationUrl": "https://developer.folk.app/api-reference/errors#rate-limiting",
"requestId": "123e4567-e89b-12d3-a456-426614174000",
"timestamp": "2025-10-01T12:00:00Z",
"details": {
"limit": 1000,
"remaining": 0,
"retryAfter": "2025-10-01T12:00:00Z"
}
}
}{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "An internal server error occurred.",
"documentationUrl": "https://developer.folk.app/api-reference/errors#internal-server-error",
"requestId": "123e4567-e89b-12d3-a456-426614174000",
"timestamp": "2025-10-01T12:00:00Z"
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "The service is currently unavailable.",
"documentationUrl": "https://developer.folk.app/api-reference/errors#service-unavailable",
"requestId": "123e4567-e89b-12d3-a456-426614174000",
"timestamp": "2025-10-01T12:00:00Z"
}
}Authorizations
API key for authentication
Path Parameters
The identifier of the group. You can retrieve a list of group identifiers using the /v1/groups endpoint.
Required string length:
40The entity type the custom fields belong to. It can be person, company, or a custom object name.
Maximum string length:
500The custom field name to update.
Maximum string length:
500Body
application/json
Required string length:
1 - 500- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Show child attributes
Show child attributes
Array of options to add if no duplicated a found.
Required array length:
1 - 100 elementsShow child attributes
Show child attributes
Array of option IDs to remove. All data associated to contacts will be removed.
Required array length:
1 - 100 elementsRequired string length:
41Array of options to update based on their ID.
Required array length:
1 - 100 elementsShow child attributes
Show child attributes
Response
The updated group custom field.
Show child attributes
Show child attributes
Example:
{
"item": {
"name": "Status",
"type": "singleSelect",
"options": [
{
"id": "gcfo_bc984b3f-0386-434d-82d7-a91eb6badd71",
"label": "Active",
"color": "#ffffff"
},
{
"id": "gcfo_28cf7f0a-fb0a-4b6b-9d47-3f5f2e3f1a3f",
"label": "Inactive",
"color": "#000000"
}
]
},
"nextLink": "https://api.folk.app/groups/grp_bc984b3f-0386-434d-82d7-a91eb6badd71/custom-fields/person/Newname"
}
Example:
["This field is deprecated"]
⌘I