Skip to content

Contact

Contacts represent individual people in Lightfield. Contacts can be associated with one or more accounts.

Get contact field definitions
client.contact.definitions(RequestOptionsoptions?): ContactDefinitionsResponse { fieldDefinitions, objectType, relationshipDefinitions }
GET/v1/contacts/definitions
Create a contact
client.contact.create(ContactCreateParams { fields, relationships } body, RequestOptionsoptions?): ContactCreateResponse { id, createdAt, fields, 4 more }
POST/v1/contacts
Update a contact
client.contact.update(stringid, ContactUpdateParams { fields, relationships } body, RequestOptionsoptions?): ContactUpdateResponse { id, createdAt, fields, 4 more }
POST/v1/contacts/{id}
Retrieve a contact
client.contact.retrieve(stringid, RequestOptionsoptions?): ContactRetrieveResponse { id, createdAt, fields, 4 more }
GET/v1/contacts/{id}
List contacts
client.contact.list(ContactListParams { limit, offset } query?, RequestOptionsoptions?): ContactListResponse { data, object, totalCount }
GET/v1/contacts
ModelsExpand Collapse
ContactCreateResponse { id, createdAt, fields, 4 more }
id: string

Unique identifier for the entity.

createdAt: string

ISO 8601 timestamp of when the entity was created.

fields: Record<string, Fields>

Map of field names to their typed values. System fields are prefixed with $ (e.g. $name, $email); custom attributes use their bare slug.

value: string | number | boolean | 3 more | null

The field value, or null if unset.

Accepts one of the following:
string
number
boolean
Array<string>
Address { city, country, latitude, 5 more }
city?: string | null

City name.

country?: string | null

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

latitude?: number | null

Latitude coordinate.

longitude?: number | null

Longitude coordinate.

postalCode?: string | null

Postal or ZIP code.

state?: string | null

State or province.

street?: string | null

Street address line 1.

street2?: string | null

Street address line 2.

FullName { firstName, lastName }
firstName?: string | null

The contact's first name.

lastName?: string | null

The contact's last name.

valueType: "ADDRESS" | "CHECKBOX" | "CURRENCY" | 11 more

The data type of the field.

Accepts one of the following:
"ADDRESS"
"CHECKBOX"
"CURRENCY"
"DATETIME"
"EMAIL"
"FULL_NAME"
"MARKDOWN"
"MULTI_SELECT"
"NUMBER"
"SINGLE_SELECT"
"SOCIAL_HANDLE"
"TELEPHONE"
"TEXT"
"URL"
relationships: Record<string, Relationships>

Map of relationship names to their associated entities. System relationships are prefixed with $ (e.g. $owner, $contact).

cardinality: string

Whether the relationship is has_one or has_many.

objectType: string

The type of the related object (e.g. account, contact).

values: Array<string>

IDs of the related entities.

updatedAt: string | null

ISO 8601 timestamp of when the entity was last updated, or null.

externalId?: string | null

External identifier for the entity, or null if unset.

ContactDefinitionsResponse { fieldDefinitions, objectType, relationshipDefinitions }
fieldDefinitions: Record<string, FieldDefinitions>

Map of field keys to their definitions, including both system and custom fields.

description: string | null

Description of the field, or null.

label: string

Human-readable display name of the field.

typeConfiguration: TypeConfiguration { currency, handleService, multipleValues, 2 more }

Type-specific configuration (e.g. select options, currency code).

currency?: string

ISO 4217 3-letter currency code.

handleService?: "TWITTER" | "LINKEDIN" | "FACEBOOK" | "INSTAGRAM"

Social platform associated with this handle field.

Accepts one of the following:
"TWITTER"
"LINKEDIN"
"FACEBOOK"
"INSTAGRAM"
multipleValues?: boolean

Whether this field accepts multiple values.

options?: Array<Option>

Available options for select fields.

id: string

Unique identifier of the select option.

label: string

Human-readable display name of the option.

description?: string | null

Description of the option, or null.

unique?: boolean

Whether values for this field must be unique.

valueType: "ADDRESS" | "CHECKBOX" | "CURRENCY" | 11 more

Data type of the field.

Accepts one of the following:
"ADDRESS"
"CHECKBOX"
"CURRENCY"
"DATETIME"
"EMAIL"
"FULL_NAME"
"MARKDOWN"
"MULTI_SELECT"
"NUMBER"
"SINGLE_SELECT"
"SOCIAL_HANDLE"
"TELEPHONE"
"TEXT"
"URL"
id?: string

Unique identifier of the field definition.

readOnly?: boolean

true for fields that are not writable via the API (e.g. AI-generated summaries). false or absent for writable fields.

objectType: string

The object type these definitions belong to (e.g. account).

relationshipDefinitions: Record<string, RelationshipDefinitions>

Map of relationship keys to their definitions.

cardinality: "HAS_ONE" | "HAS_MANY"

Whether this is a has_one or has_many relationship.

Accepts one of the following:
"HAS_ONE"
"HAS_MANY"
description: string | null

Description of the relationship, or null.

label: string

Human-readable display name of the relationship.

objectType: string

The type of the related object (e.g. account, contact).

id?: string

Unique identifier of the relationship definition.

ContactListResponse { data, object, totalCount }
data: Array<Data>

Array of entity objects for the current page.

id: string

Unique identifier for the entity.

createdAt: string

ISO 8601 timestamp of when the entity was created.

fields: Record<string, Fields>

Map of field names to their typed values. System fields are prefixed with $ (e.g. $name, $email); custom attributes use their bare slug.

value: string | number | boolean | 3 more | null

The field value, or null if unset.

Accepts one of the following:
string
number
boolean
Array<string>
Address { city, country, latitude, 5 more }
city?: string | null

City name.

country?: string | null

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

latitude?: number | null

Latitude coordinate.

longitude?: number | null

Longitude coordinate.

postalCode?: string | null

Postal or ZIP code.

state?: string | null

State or province.

street?: string | null

Street address line 1.

street2?: string | null

Street address line 2.

FullName { firstName, lastName }
firstName?: string | null

The contact's first name.

lastName?: string | null

The contact's last name.

valueType: "ADDRESS" | "CHECKBOX" | "CURRENCY" | 11 more

The data type of the field.

Accepts one of the following:
"ADDRESS"
"CHECKBOX"
"CURRENCY"
"DATETIME"
"EMAIL"
"FULL_NAME"
"MARKDOWN"
"MULTI_SELECT"
"NUMBER"
"SINGLE_SELECT"
"SOCIAL_HANDLE"
"TELEPHONE"
"TEXT"
"URL"
relationships: Record<string, Relationships>

Map of relationship names to their associated entities. System relationships are prefixed with $ (e.g. $owner, $contact).

cardinality: string

Whether the relationship is has_one or has_many.

objectType: string

The type of the related object (e.g. account, contact).

values: Array<string>

IDs of the related entities.

updatedAt: string | null

ISO 8601 timestamp of when the entity was last updated, or null.

externalId?: string | null

External identifier for the entity, or null if unset.

object: string

The object type, always "list".

totalCount: number

Total number of entities matching the query.

minimum0
maximum9007199254740991
ContactRetrieveResponse { id, createdAt, fields, 4 more }
id: string

Unique identifier for the entity.

createdAt: string

ISO 8601 timestamp of when the entity was created.

fields: Record<string, Fields>

Map of field names to their typed values. System fields are prefixed with $ (e.g. $name, $email); custom attributes use their bare slug.

value: string | number | boolean | 3 more | null

The field value, or null if unset.

Accepts one of the following:
string
number
boolean
Array<string>
Address { city, country, latitude, 5 more }
city?: string | null

City name.

country?: string | null

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

latitude?: number | null

Latitude coordinate.

longitude?: number | null

Longitude coordinate.

postalCode?: string | null

Postal or ZIP code.

state?: string | null

State or province.

street?: string | null

Street address line 1.

street2?: string | null

Street address line 2.

FullName { firstName, lastName }
firstName?: string | null

The contact's first name.

lastName?: string | null

The contact's last name.

valueType: "ADDRESS" | "CHECKBOX" | "CURRENCY" | 11 more

The data type of the field.

Accepts one of the following:
"ADDRESS"
"CHECKBOX"
"CURRENCY"
"DATETIME"
"EMAIL"
"FULL_NAME"
"MARKDOWN"
"MULTI_SELECT"
"NUMBER"
"SINGLE_SELECT"
"SOCIAL_HANDLE"
"TELEPHONE"
"TEXT"
"URL"
relationships: Record<string, Relationships>

Map of relationship names to their associated entities. System relationships are prefixed with $ (e.g. $owner, $contact).

cardinality: string

Whether the relationship is has_one or has_many.

objectType: string

The type of the related object (e.g. account, contact).

values: Array<string>

IDs of the related entities.

updatedAt: string | null

ISO 8601 timestamp of when the entity was last updated, or null.

externalId?: string | null

External identifier for the entity, or null if unset.

ContactUpdateResponse { id, createdAt, fields, 4 more }
id: string

Unique identifier for the entity.

createdAt: string

ISO 8601 timestamp of when the entity was created.

fields: Record<string, Fields>

Map of field names to their typed values. System fields are prefixed with $ (e.g. $name, $email); custom attributes use their bare slug.

value: string | number | boolean | 3 more | null

The field value, or null if unset.

Accepts one of the following:
string
number
boolean
Array<string>
Address { city, country, latitude, 5 more }
city?: string | null

City name.

country?: string | null

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

latitude?: number | null

Latitude coordinate.

longitude?: number | null

Longitude coordinate.

postalCode?: string | null

Postal or ZIP code.

state?: string | null

State or province.

street?: string | null

Street address line 1.

street2?: string | null

Street address line 2.

FullName { firstName, lastName }
firstName?: string | null

The contact's first name.

lastName?: string | null

The contact's last name.

valueType: "ADDRESS" | "CHECKBOX" | "CURRENCY" | 11 more

The data type of the field.

Accepts one of the following:
"ADDRESS"
"CHECKBOX"
"CURRENCY"
"DATETIME"
"EMAIL"
"FULL_NAME"
"MARKDOWN"
"MULTI_SELECT"
"NUMBER"
"SINGLE_SELECT"
"SOCIAL_HANDLE"
"TELEPHONE"
"TEXT"
"URL"
relationships: Record<string, Relationships>

Map of relationship names to their associated entities. System relationships are prefixed with $ (e.g. $owner, $contact).

cardinality: string

Whether the relationship is has_one or has_many.

objectType: string

The type of the related object (e.g. account, contact).

values: Array<string>

IDs of the related entities.

updatedAt: string | null

ISO 8601 timestamp of when the entity was last updated, or null.

externalId?: string | null

External identifier for the entity, or null if unset.