Skip to main content
POST
/
crm
/
objects
/
{objectName}
/
fields
/
{fieldName}
/
enum
Add enum value
curl --request POST \
  --url https://www.dench.com/api/v1/crm/objects/{objectName}/fields/{fieldName}/enum \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "value": "Nurturing",
  "color": "#eab308",
  "position": 2
}
'
{
  "ok": true,
  "enumValues": [
    "<string>"
  ],
  "enumColors": [
    "<string>"
  ],
  "inserted": true
}

Authorizations

Authorization
string
header
required

Workspace-scoped Dench API key from workspace settings. This is the same key used by DENCH_API_KEY in sandboxes.

Path Parameters

objectName
string
required
fieldName
string
required

Body

application/json
value
string
required

Option value to add.

color
string

Hex color for the option.

position
integer

0-based insert index; defaults to append.

Required range: -9007199254740991 <= x <= 9007199254740991

Response

Successful response

ok
boolean
required
enumValues
string[]
required
enumColors
string[]
required
inserted
boolean
required