Update a custom field definition
curl --request PATCH \
--url https://api.snitcher.com/v1/workspaces/{workspaceUuid}/custom-fields/{key} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Industry",
"description": "The primary industry of the company.",
"field_rules": [
{
"type": "<string>",
"config": {}
}
],
"options": [
{
"key": "technology",
"label": "Technology",
"color": "#FF0000"
}
]
}
'import requests
url = "https://api.snitcher.com/v1/workspaces/{workspaceUuid}/custom-fields/{key}"
payload = {
"name": "Industry",
"description": "The primary industry of the company.",
"field_rules": [
{
"type": "<string>",
"config": {}
}
],
"options": [
{
"key": "technology",
"label": "Technology",
"color": "#FF0000"
}
]
}
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({
name: 'Industry',
description: 'The primary industry of the company.',
field_rules: [{type: '<string>', config: {}}],
options: [{key: 'technology', label: 'Technology', color: '#FF0000'}]
})
};
fetch('https://api.snitcher.com/v1/workspaces/{workspaceUuid}/custom-fields/{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.snitcher.com/v1/workspaces/{workspaceUuid}/custom-fields/{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([
'name' => 'Industry',
'description' => 'The primary industry of the company.',
'field_rules' => [
[
'type' => '<string>',
'config' => [
]
]
],
'options' => [
[
'key' => 'technology',
'label' => 'Technology',
'color' => '#FF0000'
]
]
]),
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.snitcher.com/v1/workspaces/{workspaceUuid}/custom-fields/{key}"
payload := strings.NewReader("{\n \"name\": \"Industry\",\n \"description\": \"The primary industry of the company.\",\n \"field_rules\": [\n {\n \"type\": \"<string>\",\n \"config\": {}\n }\n ],\n \"options\": [\n {\n \"key\": \"technology\",\n \"label\": \"Technology\",\n \"color\": \"#FF0000\"\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))
}HttpResponse<String> response = Unirest.patch("https://api.snitcher.com/v1/workspaces/{workspaceUuid}/custom-fields/{key}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Industry\",\n \"description\": \"The primary industry of the company.\",\n \"field_rules\": [\n {\n \"type\": \"<string>\",\n \"config\": {}\n }\n ],\n \"options\": [\n {\n \"key\": \"technology\",\n \"label\": \"Technology\",\n \"color\": \"#FF0000\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snitcher.com/v1/workspaces/{workspaceUuid}/custom-fields/{key}")
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\": \"Industry\",\n \"description\": \"The primary industry of the company.\",\n \"field_rules\": [\n {\n \"type\": \"<string>\",\n \"config\": {}\n }\n ],\n \"options\": [\n {\n \"key\": \"technology\",\n \"label\": \"Technology\",\n \"color\": \"#FF0000\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"identifier": "industry",
"key": "industry",
"name": "Industry",
"entity_type": "organisation",
"type": "text",
"description": "The primary industry of the company.",
"group": "custom",
"is_visible": true,
"source": "manual",
"rules": [
{}
],
"is_system": false,
"options": [
{}
]
}Custom Fields
Update a custom field definition
PATCH
/
v1
/
workspaces
/
{workspaceUuid}
/
custom-fields
/
{key}
Update a custom field definition
curl --request PATCH \
--url https://api.snitcher.com/v1/workspaces/{workspaceUuid}/custom-fields/{key} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Industry",
"description": "The primary industry of the company.",
"field_rules": [
{
"type": "<string>",
"config": {}
}
],
"options": [
{
"key": "technology",
"label": "Technology",
"color": "#FF0000"
}
]
}
'import requests
url = "https://api.snitcher.com/v1/workspaces/{workspaceUuid}/custom-fields/{key}"
payload = {
"name": "Industry",
"description": "The primary industry of the company.",
"field_rules": [
{
"type": "<string>",
"config": {}
}
],
"options": [
{
"key": "technology",
"label": "Technology",
"color": "#FF0000"
}
]
}
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({
name: 'Industry',
description: 'The primary industry of the company.',
field_rules: [{type: '<string>', config: {}}],
options: [{key: 'technology', label: 'Technology', color: '#FF0000'}]
})
};
fetch('https://api.snitcher.com/v1/workspaces/{workspaceUuid}/custom-fields/{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.snitcher.com/v1/workspaces/{workspaceUuid}/custom-fields/{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([
'name' => 'Industry',
'description' => 'The primary industry of the company.',
'field_rules' => [
[
'type' => '<string>',
'config' => [
]
]
],
'options' => [
[
'key' => 'technology',
'label' => 'Technology',
'color' => '#FF0000'
]
]
]),
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.snitcher.com/v1/workspaces/{workspaceUuid}/custom-fields/{key}"
payload := strings.NewReader("{\n \"name\": \"Industry\",\n \"description\": \"The primary industry of the company.\",\n \"field_rules\": [\n {\n \"type\": \"<string>\",\n \"config\": {}\n }\n ],\n \"options\": [\n {\n \"key\": \"technology\",\n \"label\": \"Technology\",\n \"color\": \"#FF0000\"\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))
}HttpResponse<String> response = Unirest.patch("https://api.snitcher.com/v1/workspaces/{workspaceUuid}/custom-fields/{key}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Industry\",\n \"description\": \"The primary industry of the company.\",\n \"field_rules\": [\n {\n \"type\": \"<string>\",\n \"config\": {}\n }\n ],\n \"options\": [\n {\n \"key\": \"technology\",\n \"label\": \"Technology\",\n \"color\": \"#FF0000\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snitcher.com/v1/workspaces/{workspaceUuid}/custom-fields/{key}")
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\": \"Industry\",\n \"description\": \"The primary industry of the company.\",\n \"field_rules\": [\n {\n \"type\": \"<string>\",\n \"config\": {}\n }\n ],\n \"options\": [\n {\n \"key\": \"technology\",\n \"label\": \"Technology\",\n \"color\": \"#FF0000\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"identifier": "industry",
"key": "industry",
"name": "Industry",
"entity_type": "organisation",
"type": "text",
"description": "The primary industry of the company.",
"group": "custom",
"is_visible": true,
"source": "manual",
"rules": [
{}
],
"is_system": false,
"options": [
{}
]
}Authorizations
Enter your personal access token (PAT) to authenticate
Path Parameters
The UUID of the workspace
Example:
"550e8400-e29b-41d4-a716-446655440000"
The key of the custom field
Example:
"industry"
Body
application/json
Request body for updating a custom field definition
Response
The updated custom field definition
A custom field definition for organisations
The unique identifier of the field
Example:
"industry"
The machine-readable key of the field
Example:
"industry"
The human-readable name of the field
Example:
"Industry"
The entity type the field belongs to
Example:
"organisation"
The data type of the field
Example:
"text"
Example:
"The primary industry of the company."
The group the field belongs to
Example:
"custom"
Example:
true
The source of the field
Example:
"manual"
Example:
false
⌘I