---
title: "Create field"
method: POST
path: "/crm/objects/{objectName}/fields"
tags: ["crm"]
---

# Create field

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

## Request

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

Create a CRM field or read-only campaign activity boolean column.

## Path parameters

- `objectName` string, required

## Request body

- object
  - `name` string, required
  - `type` 'text' | 'email' | 'phone' | 'url' | 'number' | 'boolean' | 'date' | 'richtext' | 'file' | 'user' | 'enum' | 'relation' | 'tags' | 'action': Defaults to boolean with calculation, otherwise text. Calculations require boolean.
  - `required` boolean
  - `defaultValue` string
  - `relatedObjectName` string: Target object for `relation` fields.
  - `relationshipType` 'many_to_one' | 'many_to_many': Relation cardinality for a `relation` field.
  - `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.
    - `category` 'people' | 'company', required
    - `key` string, required
    - `responsePath` string: Dotted path to the value in the enrichment result. Required.
    - `inputFieldName` string
  - `calculation` object: Read-only campaign activity boolean on people or lead (through Contact), not an expression. Cannot be required, indexed, enriched or have a default value.
    - `kind` 'campaign_activity', required
    - `metric` 'email_opened' | 'email_clicked' | 'replied' | 'linkedin_connected', required
    - `campaignId` string: Same-workspace multichannel campaign ID readable by the viewer. Omit for any accessible multichannel campaign.

## Response `200`

Successful response

- object
  - `id` string, 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)
