Skip to main content

Update Field

Update an existing contact field by its ID.


Endpoint

PATCH https://api.campaignlark.com/v1/fields/:id

Path Parameters

ParameterTypeRequiredDescription
idintegerrequiredThe field ID.

Request Body

FieldTypeRequiredDescription
labelstringrequiredHuman-readable display name. 1–32 characters. Must be unique within the workspace.
merge_tagstringrequiredThe key used to reference this field in contact data payloads. 2–16 characters, lowercase letters and underscores only. Must be unique.
typestringrequiredData type of the field. Must match the field's existing type — the type cannot be changed.
definitionstringconditionalRequired for DROPDOWN_SINGLE and DROPDOWN_MULTIPLE types. Comma-separated list of at least 2 unique options.
default_valuestringoptionalValue used when no value is provided for this field.
requiredbooleanoptionalWhether this field must have a value on every contact.

Sample Request

PATCH https://api.campaignlark.com/v1/fields/6
Content-Type: application/json

{
"label": "Favorite Color Updated",
"merge_tag": "fav_color",
"type": "DROPDOWN_SINGLE",
"definition": "Red,Blue,Green,Yellow",
"default_value": "",
"required": false
}

Response

Success — 200 OK

{
"data": {
"id": 6,
"label": "Favorite Color Updated",
"merge_tag": "fav_color",
"type": "DROPDOWN_SINGLE",
"definition": "Red,Blue,Green,Yellow",
"default_value": "",
"order": 0,
"immutable": false,
"required": false
}
}

Errors

StatusMessageCause
404We were unable to find the field.Field does not exist in this workspace.
400This field is immutable and cannot be updated.Immutable fields (e.g. email_address) cannot be modified.
400The type of the field cannot be changed.The type value does not match the field's existing type.
400Validation errorlabel is missing, empty, or exceeds 32 characters.
400Validation errormerge_tag is missing, invalid format, or exceeds 16 characters.
400Validation errordefinition is required for dropdown types and must contain at least 2 unique options.
400Validation errorA field with the same label or merge_tag already exists.
400Validation errorAn import or export is currently in progress.