Rename enum value
curl --request POST \
--url https://www.dench.com/api/v1/crm/objects/{objectName}/fields/{fieldName}/enum/{oldValue}/rename \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"newValue": "string"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({newValue: 'string'})
};
fetch('https://www.dench.com/api/v1/crm/objects/{objectName}/fields/{fieldName}/enum/{oldValue}/rename', 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/{oldValue}/rename"
payload = { "newValue": "string" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"enumValues": [
"New",
"Working",
"Closed Won",
"Lost"
],
"enumColors": [
"#94a3b8",
"#3b82f6",
"#22c55e",
"#ef4444"
],
"entriesUpdated": 7
}{
"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
Rename enum value
Rename an enum value.
POST
/
crm
/
objects
/
{objectName}
/
fields
/
{fieldName}
/
enum
/
{oldValue}
/
rename
Rename enum value
curl --request POST \
--url https://www.dench.com/api/v1/crm/objects/{objectName}/fields/{fieldName}/enum/{oldValue}/rename \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"newValue": "string"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({newValue: 'string'})
};
fetch('https://www.dench.com/api/v1/crm/objects/{objectName}/fields/{fieldName}/enum/{oldValue}/rename', 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/{oldValue}/rename"
payload = { "newValue": "string" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"enumValues": [
"New",
"Working",
"Closed Won",
"Lost"
],
"enumColors": [
"#94a3b8",
"#3b82f6",
"#22c55e",
"#ef4444"
],
"entriesUpdated": 7
}{
"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.
Path Parameters
Existing option value (path).
Body
application/json
New option value; migrates entries + statuses.