Skip to main content
POST
/
crm
/
objects
/
{objectName}
/
fields
Create field
curl --request POST \
  --url https://www.dench.com/api/v1/crm/objects/{objectName}/fields \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Status",
  "type": "enum",
  "enumValues": [
    "New",
    "Working",
    "Qualified",
    "Lost"
  ],
  "enumColors": [
    "#94a3b8",
    "#3b82f6",
    "#22c55e",
    "#ef4444"
  ],
  "indexed": true
}
'
{
  "id": "<string>"
}

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

Body

application/json
name
string
required
type
enum<string>
required

Field data type. relation needs relatedObjectName + relationshipType; enum uses enumValues/enumColors; user cells store a member userId; long prose belongs in the protected Notes richtext field.

Available options:
text,
email,
phone,
url,
number,
boolean,
date,
richtext,
file,
user,
enum,
relation,
tags,
action
required
boolean
defaultValue
string

Target object for relation fields.

relationshipType
enum<string>

Relation cardinality for a relation field.

Available options:
many_to_one,
many_to_many
enumValues
string[]

Options for enum fields.

enumColors
string[]

Hex colors aligned to enumValues.

enumMultiple
boolean

Allow multi-select enum.

description
string
indexed
boolean

Index for filter/search/sort.

enrichment
object

Enrichment binding that lets the field auto-fill from a provider.

Response

Successful response

id
string
required