API

Contact fields API

Define your own typed fields on contacts and send their values with any contact request.

Contact fields are your own typed details on each contact. Define them here, then send values in custom on any contact endpoint.

GET/api/v1/custom-fields

Scope

contacts:read
POST/api/v1/custom-fields

Scope

contacts:write

Fields

keyRequiredtypeRequiredlabeloptions
json
{ "key": "last_order_date", "label": "Last order date", "type": "date" }

Returns 201 with the field

json
{
  "data": {
    "id": 7,
    "key": "last_order_date",
    "label": "Last order date",
    "type": "date",
    "options": null,
    "created_at": "2026-10-26T09:00:00.000Z",
    "updated_at": "2026-10-26T09:00:00.000Z"
  }
}
TypeSend values as
textA string up to 500 characters, or a number
numberA number, or a string such as "3"
date2026-10-21, or a full ISO date and time; only the date is kept
booleantrue or false, or the strings true, false, yes, no, 1, 0
selectOne of the field's options. Case does not matter, and the option's own spelling is saved.

One field

GET/api/v1/custom-fields/{id}

Scope

contacts:read
PATCH/api/v1/custom-fields/{id}

Scope

contacts:write

Fields

labeloptions
DELETE/api/v1/custom-fields/{id}

Scope

contacts:write

{id} is the field's id or its key. Only the label and a select field's options can change. Sending a different key or type returns 422, and removing an option that contacts still have returns 422 with code option_in_use. Deleting a field removes its value from every contact and cannot be undone. A field that a dynamic list's filter uses cannot be deleted: the call returns 409 with code custom_field_in_use and the lists that use it. Every change is kept in the audit log.

Values on contacts

Send custom with POST /api/v1/contacts, PUT /api/v1/contacts/{id}, POST /api/v1/contacts/upsert, POST /api/v1/contacts/bulk-upsert, and POST /api/v1/contacts/import. null or an empty string clears a value, and keys you leave out keep theirs.

json
{
  "email": "priya@example.com",
  "tags": ["vip"],
  "custom": { "last_order_date": "2026-10-01", "order_count": 3, "tier": "gold" }
}

Contacts come back with custom holding only the fields that have a value:

json
{
  "id": 42,
  "email": "priya@example.com",
  "country": "IN",
  "tags": ["vip"],
  "custom": { "last_order_date": "2026-10-01", "order_count": 3, "tier": "gold" }
}

A key that is not one of the project's fields, or a value of the wrong type, returns HTTP 422 and nothing is saved:

json
{
  "error": "custom.order_count must be a number",
  "code": "invalid_custom_value",
  "field": "order_count",
  "type": "number"
}

The code is unknown_custom_field when the key does not exist. In a request with several contacts the message starts with the position, such as contacts[3].custom.order_count must be a number, and the body also has index.

In templates

{{custom.key}} fills in each contact's value. See Template variables.