Skip to content

Task

Tasks represent action items in Lightfield. Each task belongs to an account, is assigned to a member, and can optionally be associated with an opportunity.

Get task field definitions
client.Task.Definitions(ctx) (*TaskDefinitionsResponse, error)
GET/v1/tasks/definitions
Create a task
client.Task.New(ctx, body) (*TaskCreateResponse, error)
POST/v1/tasks
Update a task
client.Task.Update(ctx, id, body) (*TaskUpdateResponse, error)
POST/v1/tasks/{id}
Retrieve a task
client.Task.Get(ctx, id) (*TaskRetrieveResponse, error)
GET/v1/tasks/{id}
List tasks
client.Task.List(ctx, query) (*TaskListResponse, error)
GET/v1/tasks
ModelsExpand Collapse
type TaskCreateResponse struct{…}
ID string

Unique identifier for the entity.

CreatedAt string

ISO 8601 timestamp of when the entity was created.

Fields map[string, TaskCreateResponseField]

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

Value TaskCreateResponseFieldValueUnion

The field value, or null if unset.

One of the following:
string
float64
bool
type TaskCreateResponseFieldValueArray []string
type TaskCreateResponseFieldValueAddress 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 TaskCreateResponseFieldValueFullName 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 TaskCreateResponseFieldValueTypeAddress TaskCreateResponseFieldValueType = "ADDRESS"
const TaskCreateResponseFieldValueTypeCheckbox TaskCreateResponseFieldValueType = "CHECKBOX"
const TaskCreateResponseFieldValueTypeCurrency TaskCreateResponseFieldValueType = "CURRENCY"
const TaskCreateResponseFieldValueTypeDatetime TaskCreateResponseFieldValueType = "DATETIME"
const TaskCreateResponseFieldValueTypeEmail TaskCreateResponseFieldValueType = "EMAIL"
const TaskCreateResponseFieldValueTypeFullName TaskCreateResponseFieldValueType = "FULL_NAME"
const TaskCreateResponseFieldValueTypeMarkdown TaskCreateResponseFieldValueType = "MARKDOWN"
const TaskCreateResponseFieldValueTypeMultiSelect TaskCreateResponseFieldValueType = "MULTI_SELECT"
const TaskCreateResponseFieldValueTypeNumber TaskCreateResponseFieldValueType = "NUMBER"
const TaskCreateResponseFieldValueTypeSingleSelect TaskCreateResponseFieldValueType = "SINGLE_SELECT"
const TaskCreateResponseFieldValueTypeSocialHandle TaskCreateResponseFieldValueType = "SOCIAL_HANDLE"
const TaskCreateResponseFieldValueTypeTelephone TaskCreateResponseFieldValueType = "TELEPHONE"
const TaskCreateResponseFieldValueTypeText TaskCreateResponseFieldValueType = "TEXT"
const TaskCreateResponseFieldValueTypeURL TaskCreateResponseFieldValueType = "URL"
Relationships map[string, TaskCreateResponseRelationship]

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 TaskDefinitionsResponse struct{…}
FieldDefinitions map[string, TaskDefinitionsResponseFieldDefinition]

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 TaskDefinitionsResponseFieldDefinitionTypeConfiguration

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 TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceTwitter TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "TWITTER"
const TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceLinkedin TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "LINKEDIN"
const TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceFacebook TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "FACEBOOK"
const TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceInstagram TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "INSTAGRAM"
MultipleValues boolOptional

Whether this field accepts multiple values.

Options []TaskDefinitionsResponseFieldDefinitionTypeConfigurationOptionOptional

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 TaskDefinitionsResponseFieldDefinitionValueTypeAddress TaskDefinitionsResponseFieldDefinitionValueType = "ADDRESS"
const TaskDefinitionsResponseFieldDefinitionValueTypeCheckbox TaskDefinitionsResponseFieldDefinitionValueType = "CHECKBOX"
const TaskDefinitionsResponseFieldDefinitionValueTypeCurrency TaskDefinitionsResponseFieldDefinitionValueType = "CURRENCY"
const TaskDefinitionsResponseFieldDefinitionValueTypeDatetime TaskDefinitionsResponseFieldDefinitionValueType = "DATETIME"
const TaskDefinitionsResponseFieldDefinitionValueTypeEmail TaskDefinitionsResponseFieldDefinitionValueType = "EMAIL"
const TaskDefinitionsResponseFieldDefinitionValueTypeFullName TaskDefinitionsResponseFieldDefinitionValueType = "FULL_NAME"
const TaskDefinitionsResponseFieldDefinitionValueTypeMarkdown TaskDefinitionsResponseFieldDefinitionValueType = "MARKDOWN"
const TaskDefinitionsResponseFieldDefinitionValueTypeMultiSelect TaskDefinitionsResponseFieldDefinitionValueType = "MULTI_SELECT"
const TaskDefinitionsResponseFieldDefinitionValueTypeNumber TaskDefinitionsResponseFieldDefinitionValueType = "NUMBER"
const TaskDefinitionsResponseFieldDefinitionValueTypeSingleSelect TaskDefinitionsResponseFieldDefinitionValueType = "SINGLE_SELECT"
const TaskDefinitionsResponseFieldDefinitionValueTypeSocialHandle TaskDefinitionsResponseFieldDefinitionValueType = "SOCIAL_HANDLE"
const TaskDefinitionsResponseFieldDefinitionValueTypeTelephone TaskDefinitionsResponseFieldDefinitionValueType = "TELEPHONE"
const TaskDefinitionsResponseFieldDefinitionValueTypeText TaskDefinitionsResponseFieldDefinitionValueType = "TEXT"
const TaskDefinitionsResponseFieldDefinitionValueTypeURL TaskDefinitionsResponseFieldDefinitionValueType = "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, TaskDefinitionsResponseRelationshipDefinition]

Map of relationship keys to their definitions.

Cardinality string

Whether this is a has_one or has_many relationship.

One of the following:
const TaskDefinitionsResponseRelationshipDefinitionCardinalityHasOne TaskDefinitionsResponseRelationshipDefinitionCardinality = "HAS_ONE"
const TaskDefinitionsResponseRelationshipDefinitionCardinalityHasMany TaskDefinitionsResponseRelationshipDefinitionCardinality = "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 TaskListResponse struct{…}
Data []TaskListResponseData

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, TaskListResponseDataField]

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

Value TaskListResponseDataFieldValueUnion

The field value, or null if unset.

One of the following:
string
float64
bool
type TaskListResponseDataFieldValueArray []string
type TaskListResponseDataFieldValueAddress 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 TaskListResponseDataFieldValueFullName 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 TaskListResponseDataFieldValueTypeAddress TaskListResponseDataFieldValueType = "ADDRESS"
const TaskListResponseDataFieldValueTypeCheckbox TaskListResponseDataFieldValueType = "CHECKBOX"
const TaskListResponseDataFieldValueTypeCurrency TaskListResponseDataFieldValueType = "CURRENCY"
const TaskListResponseDataFieldValueTypeDatetime TaskListResponseDataFieldValueType = "DATETIME"
const TaskListResponseDataFieldValueTypeEmail TaskListResponseDataFieldValueType = "EMAIL"
const TaskListResponseDataFieldValueTypeFullName TaskListResponseDataFieldValueType = "FULL_NAME"
const TaskListResponseDataFieldValueTypeMarkdown TaskListResponseDataFieldValueType = "MARKDOWN"
const TaskListResponseDataFieldValueTypeMultiSelect TaskListResponseDataFieldValueType = "MULTI_SELECT"
const TaskListResponseDataFieldValueTypeNumber TaskListResponseDataFieldValueType = "NUMBER"
const TaskListResponseDataFieldValueTypeSingleSelect TaskListResponseDataFieldValueType = "SINGLE_SELECT"
const TaskListResponseDataFieldValueTypeSocialHandle TaskListResponseDataFieldValueType = "SOCIAL_HANDLE"
const TaskListResponseDataFieldValueTypeTelephone TaskListResponseDataFieldValueType = "TELEPHONE"
const TaskListResponseDataFieldValueTypeText TaskListResponseDataFieldValueType = "TEXT"
const TaskListResponseDataFieldValueTypeURL TaskListResponseDataFieldValueType = "URL"
Relationships map[string, TaskListResponseDataRelationship]

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 TaskRetrieveResponse struct{…}
ID string

Unique identifier for the entity.

CreatedAt string

ISO 8601 timestamp of when the entity was created.

Fields map[string, TaskRetrieveResponseField]

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

Value TaskRetrieveResponseFieldValueUnion

The field value, or null if unset.

One of the following:
string
float64
bool
type TaskRetrieveResponseFieldValueArray []string
type TaskRetrieveResponseFieldValueAddress 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 TaskRetrieveResponseFieldValueFullName 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 TaskRetrieveResponseFieldValueTypeAddress TaskRetrieveResponseFieldValueType = "ADDRESS"
const TaskRetrieveResponseFieldValueTypeCheckbox TaskRetrieveResponseFieldValueType = "CHECKBOX"
const TaskRetrieveResponseFieldValueTypeCurrency TaskRetrieveResponseFieldValueType = "CURRENCY"
const TaskRetrieveResponseFieldValueTypeDatetime TaskRetrieveResponseFieldValueType = "DATETIME"
const TaskRetrieveResponseFieldValueTypeEmail TaskRetrieveResponseFieldValueType = "EMAIL"
const TaskRetrieveResponseFieldValueTypeFullName TaskRetrieveResponseFieldValueType = "FULL_NAME"
const TaskRetrieveResponseFieldValueTypeMarkdown TaskRetrieveResponseFieldValueType = "MARKDOWN"
const TaskRetrieveResponseFieldValueTypeMultiSelect TaskRetrieveResponseFieldValueType = "MULTI_SELECT"
const TaskRetrieveResponseFieldValueTypeNumber TaskRetrieveResponseFieldValueType = "NUMBER"
const TaskRetrieveResponseFieldValueTypeSingleSelect TaskRetrieveResponseFieldValueType = "SINGLE_SELECT"
const TaskRetrieveResponseFieldValueTypeSocialHandle TaskRetrieveResponseFieldValueType = "SOCIAL_HANDLE"
const TaskRetrieveResponseFieldValueTypeTelephone TaskRetrieveResponseFieldValueType = "TELEPHONE"
const TaskRetrieveResponseFieldValueTypeText TaskRetrieveResponseFieldValueType = "TEXT"
const TaskRetrieveResponseFieldValueTypeURL TaskRetrieveResponseFieldValueType = "URL"
Relationships map[string, TaskRetrieveResponseRelationship]

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 TaskUpdateResponse struct{…}
ID string

Unique identifier for the entity.

CreatedAt string

ISO 8601 timestamp of when the entity was created.

Fields map[string, TaskUpdateResponseField]

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

Value TaskUpdateResponseFieldValueUnion

The field value, or null if unset.

One of the following:
string
float64
bool
type TaskUpdateResponseFieldValueArray []string
type TaskUpdateResponseFieldValueAddress 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 TaskUpdateResponseFieldValueFullName 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 TaskUpdateResponseFieldValueTypeAddress TaskUpdateResponseFieldValueType = "ADDRESS"
const TaskUpdateResponseFieldValueTypeCheckbox TaskUpdateResponseFieldValueType = "CHECKBOX"
const TaskUpdateResponseFieldValueTypeCurrency TaskUpdateResponseFieldValueType = "CURRENCY"
const TaskUpdateResponseFieldValueTypeDatetime TaskUpdateResponseFieldValueType = "DATETIME"
const TaskUpdateResponseFieldValueTypeEmail TaskUpdateResponseFieldValueType = "EMAIL"
const TaskUpdateResponseFieldValueTypeFullName TaskUpdateResponseFieldValueType = "FULL_NAME"
const TaskUpdateResponseFieldValueTypeMarkdown TaskUpdateResponseFieldValueType = "MARKDOWN"
const TaskUpdateResponseFieldValueTypeMultiSelect TaskUpdateResponseFieldValueType = "MULTI_SELECT"
const TaskUpdateResponseFieldValueTypeNumber TaskUpdateResponseFieldValueType = "NUMBER"
const TaskUpdateResponseFieldValueTypeSingleSelect TaskUpdateResponseFieldValueType = "SINGLE_SELECT"
const TaskUpdateResponseFieldValueTypeSocialHandle TaskUpdateResponseFieldValueType = "SOCIAL_HANDLE"
const TaskUpdateResponseFieldValueTypeTelephone TaskUpdateResponseFieldValueType = "TELEPHONE"
const TaskUpdateResponseFieldValueTypeText TaskUpdateResponseFieldValueType = "TEXT"
const TaskUpdateResponseFieldValueTypeURL TaskUpdateResponseFieldValueType = "URL"
Relationships map[string, TaskUpdateResponseRelationship]

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.