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.",
"visible_in_spotter": false,
"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.",
"visible_in_spotter": False,
"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.',
visible_in_spotter: false,
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.',
'visible_in_spotter' => false,
'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 \"visible_in_spotter\": false,\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 \"visible_in_spotter\": false,\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 \"visible_in_spotter\": false,\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": [
{}
],
"visible_in_spotter": false
}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.",
"visible_in_spotter": false,
"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.",
"visible_in_spotter": False,
"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.',
visible_in_spotter: false,
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.',
'visible_in_spotter' => false,
'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 \"visible_in_spotter\": false,\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 \"visible_in_spotter\": false,\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 \"visible_in_spotter\": false,\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": [
{}
],
"visible_in_spotter": false
}Authorizations
Enter your personal access token (PAT) to authenticate
Path Parameters
The UUID of the workspace
"550e8400-e29b-41d4-a716-446655440000"
The key of the custom field
"industry"
Body
Request body for updating a custom field definition
The human-readable name of the field
255"Industry"
1000"The primary industry of the company."
Expose this field's values in the Spotter API response. Omitted or null leaves the current setting unchanged; exposed values become readable on your website by any script that can access the Spotter response.
false
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
The updated custom field definition
A custom field definition for organisations
The unique identifier of the field
"industry"
The machine-readable key of the field
"industry"
The human-readable name of the field
"Industry"
The entity type the field belongs to
"organisation"
The data type of the field
"text"
"The primary industry of the company."
The group the field belongs to
"custom"
true
The source of the field
"manual"
false
Whether this field's values are exposed in the Spotter API response
false