Set enum color
curl --request POST \
--url https://www.dench.com/api/v1/crm/objects/{objectName}/fields/{fieldName}/enum/{value}/color \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"color": "#22c55e"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({color: '#22c55e'})
};
fetch('https://www.dench.com/api/v1/crm/objects/{objectName}/fields/{fieldName}/enum/{value}/color', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.dench.com/api/v1/crm/objects/{objectName}/fields/{fieldName}/enum/{value}/color"
payload = { "color": "#22c55e" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"enumColors": [
"#94a3b8",
"#3b82f6",
"#22c55e",
"#ef4444"
]
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}crm
Set enum color
Set an enum color.
POST
/
crm
/
objects
/
{objectName}
/
fields
/
{fieldName}
/
enum
/
{value}
/
color
Set enum color
curl --request POST \
--url https://www.dench.com/api/v1/crm/objects/{objectName}/fields/{fieldName}/enum/{value}/color \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"color": "#22c55e"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({color: '#22c55e'})
};
fetch('https://www.dench.com/api/v1/crm/objects/{objectName}/fields/{fieldName}/enum/{value}/color', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.dench.com/api/v1/crm/objects/{objectName}/fields/{fieldName}/enum/{value}/color"
payload = { "color": "#22c55e" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"enumColors": [
"#94a3b8",
"#3b82f6",
"#22c55e",
"#ef4444"
]
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}Authorizations
DenchApiKeyAgentSession
Workspace-scoped Dench API key from workspace settings. This is the same key used by DENCH_API_KEY in sandboxes.
Body
application/json
Hex color, e.g. #22c55e.
⌘I