Skip to content

Get field value history

$ lightfield contact field-history
GET/v1/contacts/{id}/fields/{fieldKey}/history

Returns the value-change history for a single field on a record, newest first. Consecutive identical values are collapsed. History is cursor-paginated: pass nextCursor from the previous response as after to page through older values. Only attribute-backed fields (custom attributes and attribute-backed system fields) have history — column-backed system fields return an error.

Required scope: contacts:read

Rate limit category: Read

ParametersExpand Collapse
--id: string

Path param: Unique identifier of the record.

--field-key: string

Path param: Field key whose value history to return. System fields use a $ prefix (e.g. $status); custom attributes use their bare slug.

--after: optional string

Query param: Cursor from a previous response’s nextCursor to fetch the next page.

--limit: optional number

Query param: Maximum number of history entries to return. Defaults to 20, maximum 100.

ReturnsExpand Collapse
contact_field_history_response: object { data, hasMore, nextCursor }
data: array of object { displayValue, isCreate, recordedAt, 2 more }

Recorded values for the field, newest first.

displayValue: string

Human-readable rendering of the value (e.g. a select option label), suitable for display.

isCreate: boolean

True for the record’s original value. Only set when the full history fits in the response (never on a truncated/paginated page).

recordedAt: string

ISO 8601 timestamp of when this value was recorded.

value: string or number or boolean or 3 more

The field value, or null if unset.

union_member_0: string
union_member_1: number
union_member_2: boolean
union_member_3: array of string
Address: object { city, country, latitude, 5 more }
city: optional string

City name.

country: optional string

2-letter ISO 3166-1 alpha-2 country code.

latitude: optional number

Latitude coordinate.

longitude: optional number

Longitude coordinate.

postalCode: optional string

Postal or ZIP code.

state: optional string

State or province.

street: optional string

Street address line 1.

street2: optional string

Street address line 2.

FullName: object { firstName, lastName }
firstName: optional string

The contact’s first name.

lastName: optional string

The contact’s last name.

valueType: "ADDRESS" or "CHECKBOX" or "CURRENCY" or 12 more

The data type of the field.

"ADDRESS"
"CHECKBOX"
"CURRENCY"
"DATETIME"
"EMAIL"
"FULL_NAME"
"MARKDOWN"
"MULTI_SELECT"
"NUMBER"
"SINGLE_SELECT"
"SOCIAL_HANDLE"
"TELEPHONE"
"TEXT"
"URL"
"HTML"
hasMore: boolean

Whether more history exists beyond this page.

nextCursor: string

Cursor to pass as after to fetch the next page, or null when there are no more entries.

Get field value history

lightfield contact field-history \
  --api-key 'My API Key' \
  --id id \
  --field-key fieldKey
{
  "data": [
    {
      "displayValue": "displayValue",
      "isCreate": true,
      "recordedAt": "recordedAt",
      "value": "string",
      "valueType": "ADDRESS"
    }
  ],
  "hasMore": true,
  "nextCursor": "nextCursor"
}
Returns Examples
{
  "data": [
    {
      "displayValue": "displayValue",
      "isCreate": true,
      "recordedAt": "recordedAt",
      "value": "string",
      "valueType": "ADDRESS"
    }
  ],
  "hasMore": true,
  "nextCursor": "nextCursor"
}