---
title: "Add enum value"
method: POST
path: "/crm/objects/{objectName}/fields/{fieldName}/enum"
tags: ["crm"]
---

# Add enum value

`POST /crm/objects/{objectName}/fields/{fieldName}/enum`

## Request

- Base URL: `https://www.dench.com/api/v1`
- URL: `https://www.dench.com/api/v1/crm/objects/{objectName}/fields/{fieldName}/enum`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Add an enum value.

## Path parameters

- `objectName` string, required
- `fieldName` string, required

## Request body

- object
  - `value` string, required: Option value to add.
  - `color` string: Hex color for the option.
  - `position` integer: 0-based insert index; defaults to append.

## Response `200`

Successful response

- object
  - `ok` boolean, required
  - `enumValues` string[], required
  - `enumColors` string[], required
  - `inserted` boolean, required

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid authentication
- `404`: Operation or resource not found
- `500`: Server error

---

[API](https://skmtc.dev/dench/apis/dench-api.md) - [All operations](https://skmtc.dev/dench/apis/dench-api/llms.txt) - [OpenAPI document](https://skmtc.dev/dench/apis/dench-api/revisions/4a145b38f19c?raw)
