Skip to main content
POST
Required scope: CRM_WRITE

Body fields

A DROPDOWN field holds one value out of its options. An option without a key gets one derived from its label, the same way as the field key. Option labels must be unique within the field.

Key derivation

The key is derived from the label: lowercase, accents removed, runs of non-alphanumeric characters replaced by _, truncated to 64 characters. Lead Source becomes lead_source. A label that resolves to a built-in field key is rejected with ATTRIBUTE_KEY_RESERVED. The reserved keys are name, phone_numbers, company, job_title, emails, last_activity, website, created_at and updated_at.

Response

Returns 201 with the field. options is only present for DROPDOWN.

Creating the same field twice

The call is safe to repeat. If a field with the same key and type already exists, the endpoint returns 201 with already_existed set to true and the label it was first created with. Nothing is created. If the key exists with a different type, the request returns 409 ATTRIBUTE_KEY_CONFLICT.

Restoring a deleted field

Creating a field whose key matches a field you deleted, with the same type, restores it. The values previously stored on people come back with it, and the response has already_existed set to true. A different type returns 409 ATTRIBUTE_KEY_CONFLICT.

Limits

A team can hold up to 150 TEXT, 50 NUMBER, 30 DATE and 30 BOOLEAN custom fields. DROPDOWN fields count toward the TEXT limit. Once a type is full, creating another field of that type returns 409 ATTRIBUTE_SLOTS_EXHAUSTED.

Errors

Authorizations

Authorization
string
header
required

Body

application/json

Request body for creating a custom contact field

label
string
required

Display name of the field. The key is derived from it: lowercase, accents removed, runs of non-alphanumeric characters replaced by _, truncated to 64 characters. Must contain at least one letter or digit and must not resolve to a built-in field key such as name, company or website.

Required string length: 1 - 255
Example:

"Lead Source"

type
enum<string>
required

Value type of the field

Available options:
TEXT,
NUMBER,
DATE,
BOOLEAN,
DROPDOWN
Example:

"TEXT"

options
object[]

Allowed values. Required, with at least one option, for DROPDOWN; rejected for other types.

Response

The custom field that was created, restored or already existing

data
object