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(ctx) (*ContactDefinitionsResponse, error)
GET/v1/contacts/definitions
Create a contact
client.Contact.New(ctx, body) (*ContactCreateResponse, error)
POST/v1/contacts
Update a contact
client.Contact.Update(ctx, id, body) (*ContactUpdateResponse, error)
POST/v1/contacts/{id}
Retrieve a contact
client.Contact.Get(ctx, id) (*ContactRetrieveResponse, error)
GET/v1/contacts/{id}
List contacts
client.Contact.List(ctx, query) (*ContactListResponse, error)
GET/v1/contacts
ModelsExpand Collapse
type ContactCreateResponse struct{…}
ID string

Unique identifier for the entity.

CreatedAt string

ISO 8601 timestamp of when the entity was created.

Fields map[string, ContactCreateResponseField]

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

Value ContactCreateResponseFieldValueUnion

The field value, or null if unset.

One of the following:
string
float64
bool
type ContactCreateResponseFieldValueArray []string
type ContactCreateResponseFieldValueAddress struct{…}
City stringOptional

City name.

Country stringOptional

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

Latitude float64Optional

Latitude coordinate.

Longitude float64Optional

Longitude coordinate.

PostalCode stringOptional

Postal or ZIP code.

State stringOptional

State or province.

Street stringOptional

Street address line 1.

Street2 stringOptional

Street address line 2.

type ContactCreateResponseFieldValueFullName struct{…}
FirstName stringOptional

The contact’s first name.

LastName stringOptional

The contact’s last name.

ValueType string

The data type of the field.

One of the following:
const ContactCreateResponseFieldValueTypeAddress ContactCreateResponseFieldValueType = "ADDRESS"
const ContactCreateResponseFieldValueTypeCheckbox ContactCreateResponseFieldValueType = "CHECKBOX"
const ContactCreateResponseFieldValueTypeCurrency ContactCreateResponseFieldValueType = "CURRENCY"
const ContactCreateResponseFieldValueTypeDatetime ContactCreateResponseFieldValueType = "DATETIME"
const ContactCreateResponseFieldValueTypeEmail ContactCreateResponseFieldValueType = "EMAIL"
const ContactCreateResponseFieldValueTypeFullName ContactCreateResponseFieldValueType = "FULL_NAME"
const ContactCreateResponseFieldValueTypeMarkdown ContactCreateResponseFieldValueType = "MARKDOWN"
const ContactCreateResponseFieldValueTypeMultiSelect ContactCreateResponseFieldValueType = "MULTI_SELECT"
const ContactCreateResponseFieldValueTypeNumber ContactCreateResponseFieldValueType = "NUMBER"
const ContactCreateResponseFieldValueTypeSingleSelect ContactCreateResponseFieldValueType = "SINGLE_SELECT"
const ContactCreateResponseFieldValueTypeSocialHandle ContactCreateResponseFieldValueType = "SOCIAL_HANDLE"
const ContactCreateResponseFieldValueTypeTelephone ContactCreateResponseFieldValueType = "TELEPHONE"
const ContactCreateResponseFieldValueTypeText ContactCreateResponseFieldValueType = "TEXT"
const ContactCreateResponseFieldValueTypeURL ContactCreateResponseFieldValueType = "URL"
Relationships map[string, ContactCreateResponseRelationship]

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 []string

IDs of the related entities.

UpdatedAt string

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

ExternalID stringOptional

External identifier for the entity, or null if unset.

type ContactDefinitionsResponse struct{…}
FieldDefinitions map[string, ContactDefinitionsResponseFieldDefinition]

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

Description string

Description of the field, or null.

Label string

Human-readable display name of the field.

TypeConfiguration ContactDefinitionsResponseFieldDefinitionTypeConfiguration

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

Currency stringOptional

ISO 4217 3-letter currency code.

HandleService stringOptional

Social platform associated with this handle field.

One of the following:
const ContactDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceTwitter ContactDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "TWITTER"
const ContactDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceLinkedin ContactDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "LINKEDIN"
const ContactDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceFacebook ContactDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "FACEBOOK"
const ContactDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceInstagram ContactDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "INSTAGRAM"
MultipleValues boolOptional

Whether this field accepts multiple values.

Options []ContactDefinitionsResponseFieldDefinitionTypeConfigurationOptionOptional

Available options for select fields.

ID string

Unique identifier of the select option.

Label string

Human-readable display name of the option.

Description stringOptional

Description of the option, or null.

Unique boolOptional

Whether values for this field must be unique.

ValueType string

Data type of the field.

One of the following:
const ContactDefinitionsResponseFieldDefinitionValueTypeAddress ContactDefinitionsResponseFieldDefinitionValueType = "ADDRESS"
const ContactDefinitionsResponseFieldDefinitionValueTypeCheckbox ContactDefinitionsResponseFieldDefinitionValueType = "CHECKBOX"
const ContactDefinitionsResponseFieldDefinitionValueTypeCurrency ContactDefinitionsResponseFieldDefinitionValueType = "CURRENCY"
const ContactDefinitionsResponseFieldDefinitionValueTypeDatetime ContactDefinitionsResponseFieldDefinitionValueType = "DATETIME"
const ContactDefinitionsResponseFieldDefinitionValueTypeEmail ContactDefinitionsResponseFieldDefinitionValueType = "EMAIL"
const ContactDefinitionsResponseFieldDefinitionValueTypeFullName ContactDefinitionsResponseFieldDefinitionValueType = "FULL_NAME"
const ContactDefinitionsResponseFieldDefinitionValueTypeMarkdown ContactDefinitionsResponseFieldDefinitionValueType = "MARKDOWN"
const ContactDefinitionsResponseFieldDefinitionValueTypeMultiSelect ContactDefinitionsResponseFieldDefinitionValueType = "MULTI_SELECT"
const ContactDefinitionsResponseFieldDefinitionValueTypeNumber ContactDefinitionsResponseFieldDefinitionValueType = "NUMBER"
const ContactDefinitionsResponseFieldDefinitionValueTypeSingleSelect ContactDefinitionsResponseFieldDefinitionValueType = "SINGLE_SELECT"
const ContactDefinitionsResponseFieldDefinitionValueTypeSocialHandle ContactDefinitionsResponseFieldDefinitionValueType = "SOCIAL_HANDLE"
const ContactDefinitionsResponseFieldDefinitionValueTypeTelephone ContactDefinitionsResponseFieldDefinitionValueType = "TELEPHONE"
const ContactDefinitionsResponseFieldDefinitionValueTypeText ContactDefinitionsResponseFieldDefinitionValueType = "TEXT"
const ContactDefinitionsResponseFieldDefinitionValueTypeURL ContactDefinitionsResponseFieldDefinitionValueType = "URL"
ID stringOptional

Unique identifier of the field definition.

ReadOnly boolOptional

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 map[string, ContactDefinitionsResponseRelationshipDefinition]

Map of relationship keys to their definitions.

Cardinality string

Whether this is a has_one or has_many relationship.

One of the following:
const ContactDefinitionsResponseRelationshipDefinitionCardinalityHasOne ContactDefinitionsResponseRelationshipDefinitionCardinality = "HAS_ONE"
const ContactDefinitionsResponseRelationshipDefinitionCardinalityHasMany ContactDefinitionsResponseRelationshipDefinitionCardinality = "HAS_MANY"
Description string

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 stringOptional

Unique identifier of the relationship definition.

type ContactListResponse struct{…}
Data []ContactListResponseData

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 map[string, ContactListResponseDataField]

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

Value ContactListResponseDataFieldValueUnion

The field value, or null if unset.

One of the following:
string
float64
bool
type ContactListResponseDataFieldValueArray []string
type ContactListResponseDataFieldValueAddress struct{…}
City stringOptional

City name.

Country stringOptional

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

Latitude float64Optional

Latitude coordinate.

Longitude float64Optional

Longitude coordinate.

PostalCode stringOptional

Postal or ZIP code.

State stringOptional

State or province.

Street stringOptional

Street address line 1.

Street2 stringOptional

Street address line 2.

type ContactListResponseDataFieldValueFullName struct{…}
FirstName stringOptional

The contact’s first name.

LastName stringOptional

The contact’s last name.

ValueType string

The data type of the field.

One of the following:
const ContactListResponseDataFieldValueTypeAddress ContactListResponseDataFieldValueType = "ADDRESS"
const ContactListResponseDataFieldValueTypeCheckbox ContactListResponseDataFieldValueType = "CHECKBOX"
const ContactListResponseDataFieldValueTypeCurrency ContactListResponseDataFieldValueType = "CURRENCY"
const ContactListResponseDataFieldValueTypeDatetime ContactListResponseDataFieldValueType = "DATETIME"
const ContactListResponseDataFieldValueTypeEmail ContactListResponseDataFieldValueType = "EMAIL"
const ContactListResponseDataFieldValueTypeFullName ContactListResponseDataFieldValueType = "FULL_NAME"
const ContactListResponseDataFieldValueTypeMarkdown ContactListResponseDataFieldValueType = "MARKDOWN"
const ContactListResponseDataFieldValueTypeMultiSelect ContactListResponseDataFieldValueType = "MULTI_SELECT"
const ContactListResponseDataFieldValueTypeNumber ContactListResponseDataFieldValueType = "NUMBER"
const ContactListResponseDataFieldValueTypeSingleSelect ContactListResponseDataFieldValueType = "SINGLE_SELECT"
const ContactListResponseDataFieldValueTypeSocialHandle ContactListResponseDataFieldValueType = "SOCIAL_HANDLE"
const ContactListResponseDataFieldValueTypeTelephone ContactListResponseDataFieldValueType = "TELEPHONE"
const ContactListResponseDataFieldValueTypeText ContactListResponseDataFieldValueType = "TEXT"
const ContactListResponseDataFieldValueTypeURL ContactListResponseDataFieldValueType = "URL"
Relationships map[string, ContactListResponseDataRelationship]

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 []string

IDs of the related entities.

UpdatedAt string

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

ExternalID stringOptional

External identifier for the entity, or null if unset.

Object string

The object type, always "list".

TotalCount int64

Total number of entities matching the query.

minimum0
maximum9007199254740991
type ContactRetrieveResponse struct{…}
ID string

Unique identifier for the entity.

CreatedAt string

ISO 8601 timestamp of when the entity was created.

Fields map[string, ContactRetrieveResponseField]

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

Value ContactRetrieveResponseFieldValueUnion

The field value, or null if unset.

One of the following:
string
float64
bool
type ContactRetrieveResponseFieldValueArray []string
type ContactRetrieveResponseFieldValueAddress struct{…}
City stringOptional

City name.

Country stringOptional

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

Latitude float64Optional

Latitude coordinate.

Longitude float64Optional

Longitude coordinate.

PostalCode stringOptional

Postal or ZIP code.

State stringOptional

State or province.

Street stringOptional

Street address line 1.

Street2 stringOptional

Street address line 2.

type ContactRetrieveResponseFieldValueFullName struct{…}
FirstName stringOptional

The contact’s first name.

LastName stringOptional

The contact’s last name.

ValueType string

The data type of the field.

One of the following:
const ContactRetrieveResponseFieldValueTypeAddress ContactRetrieveResponseFieldValueType = "ADDRESS"
const ContactRetrieveResponseFieldValueTypeCheckbox ContactRetrieveResponseFieldValueType = "CHECKBOX"
const ContactRetrieveResponseFieldValueTypeCurrency ContactRetrieveResponseFieldValueType = "CURRENCY"
const ContactRetrieveResponseFieldValueTypeDatetime ContactRetrieveResponseFieldValueType = "DATETIME"
const ContactRetrieveResponseFieldValueTypeEmail ContactRetrieveResponseFieldValueType = "EMAIL"
const ContactRetrieveResponseFieldValueTypeFullName ContactRetrieveResponseFieldValueType = "FULL_NAME"
const ContactRetrieveResponseFieldValueTypeMarkdown ContactRetrieveResponseFieldValueType = "MARKDOWN"
const ContactRetrieveResponseFieldValueTypeMultiSelect ContactRetrieveResponseFieldValueType = "MULTI_SELECT"
const ContactRetrieveResponseFieldValueTypeNumber ContactRetrieveResponseFieldValueType = "NUMBER"
const ContactRetrieveResponseFieldValueTypeSingleSelect ContactRetrieveResponseFieldValueType = "SINGLE_SELECT"
const ContactRetrieveResponseFieldValueTypeSocialHandle ContactRetrieveResponseFieldValueType = "SOCIAL_HANDLE"
const ContactRetrieveResponseFieldValueTypeTelephone ContactRetrieveResponseFieldValueType = "TELEPHONE"
const ContactRetrieveResponseFieldValueTypeText ContactRetrieveResponseFieldValueType = "TEXT"
const ContactRetrieveResponseFieldValueTypeURL ContactRetrieveResponseFieldValueType = "URL"
Relationships map[string, ContactRetrieveResponseRelationship]

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 []string

IDs of the related entities.

UpdatedAt string

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

ExternalID stringOptional

External identifier for the entity, or null if unset.

type ContactUpdateResponse struct{…}
ID string

Unique identifier for the entity.

CreatedAt string

ISO 8601 timestamp of when the entity was created.

Fields map[string, ContactUpdateResponseField]

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

Value ContactUpdateResponseFieldValueUnion

The field value, or null if unset.

One of the following:
string
float64
bool
type ContactUpdateResponseFieldValueArray []string
type ContactUpdateResponseFieldValueAddress struct{…}
City stringOptional

City name.

Country stringOptional

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

Latitude float64Optional

Latitude coordinate.

Longitude float64Optional

Longitude coordinate.

PostalCode stringOptional

Postal or ZIP code.

State stringOptional

State or province.

Street stringOptional

Street address line 1.

Street2 stringOptional

Street address line 2.

type ContactUpdateResponseFieldValueFullName struct{…}
FirstName stringOptional

The contact’s first name.

LastName stringOptional

The contact’s last name.

ValueType string

The data type of the field.

One of the following:
const ContactUpdateResponseFieldValueTypeAddress ContactUpdateResponseFieldValueType = "ADDRESS"
const ContactUpdateResponseFieldValueTypeCheckbox ContactUpdateResponseFieldValueType = "CHECKBOX"
const ContactUpdateResponseFieldValueTypeCurrency ContactUpdateResponseFieldValueType = "CURRENCY"
const ContactUpdateResponseFieldValueTypeDatetime ContactUpdateResponseFieldValueType = "DATETIME"
const ContactUpdateResponseFieldValueTypeEmail ContactUpdateResponseFieldValueType = "EMAIL"
const ContactUpdateResponseFieldValueTypeFullName ContactUpdateResponseFieldValueType = "FULL_NAME"
const ContactUpdateResponseFieldValueTypeMarkdown ContactUpdateResponseFieldValueType = "MARKDOWN"
const ContactUpdateResponseFieldValueTypeMultiSelect ContactUpdateResponseFieldValueType = "MULTI_SELECT"
const ContactUpdateResponseFieldValueTypeNumber ContactUpdateResponseFieldValueType = "NUMBER"
const ContactUpdateResponseFieldValueTypeSingleSelect ContactUpdateResponseFieldValueType = "SINGLE_SELECT"
const ContactUpdateResponseFieldValueTypeSocialHandle ContactUpdateResponseFieldValueType = "SOCIAL_HANDLE"
const ContactUpdateResponseFieldValueTypeTelephone ContactUpdateResponseFieldValueType = "TELEPHONE"
const ContactUpdateResponseFieldValueTypeText ContactUpdateResponseFieldValueType = "TEXT"
const ContactUpdateResponseFieldValueTypeURL ContactUpdateResponseFieldValueType = "URL"
Relationships map[string, ContactUpdateResponseRelationship]

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 []string

IDs of the related entities.

UpdatedAt string

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

ExternalID stringOptional

External identifier for the entity, or null if unset.