# Task ## Get task field definitions `client.Task.Definitions(ctx) (*TaskDefinitionsResponse, error)` **get** `/v1/tasks/definitions` Returns the schema for the field and relationship definitions available on tasks. Useful for understanding the shape of task data before creating or updating records. See [Fields and relationships](/using-the-api/fields-and-relationships/) for more details. **[Required scope](/using-the-api/scopes/):** `tasks:read` **[Rate limit category](/using-the-api/rate-limits/):** Read ### Returns - `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 string` ISO 4217 3-letter currency code. - `HandleService string` Social platform associated with this handle field. - `const TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceTwitter TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "TWITTER"` - `const TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceLinkedin TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "LINKEDIN"` - `const TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceFacebook TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "FACEBOOK"` - `const TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceInstagram TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "INSTAGRAM"` - `MultipleValues bool` Whether this field accepts multiple values. - `Options []TaskDefinitionsResponseFieldDefinitionTypeConfigurationOption` Available options for select fields. - `ID string` Unique identifier of the select option. - `Label string` Human-readable display name of the option. - `Description string` Description of the option, or null. - `Unique bool` Whether values for this field must be unique. - `ValueType string` Data type of the field. - `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 string` Unique identifier of the field definition. - `ReadOnly bool` `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. - `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 string` Unique identifier of the relationship definition. ### Example ```go package main import ( "context" "fmt" "github.com/Lightfld/lightfield-go" "github.com/Lightfld/lightfield-go/option" ) func main() { client := githubcomlightfldlightfieldgo.NewClient( option.WithAPIKey("My API Key"), ) taskDefinitionsResponse, err := client.Task.Definitions(context.TODO()) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", taskDefinitionsResponse.FieldDefinitions) } ``` #### Response ```json { "fieldDefinitions": { "foo": { "description": "description", "label": "label", "typeConfiguration": { "currency": "currency", "handleService": "TWITTER", "multipleValues": true, "options": [ { "id": "id", "label": "label", "description": "description" } ], "unique": true }, "valueType": "ADDRESS", "id": "id", "readOnly": true } }, "objectType": "objectType", "relationshipDefinitions": { "foo": { "cardinality": "HAS_ONE", "description": "description", "label": "label", "objectType": "objectType", "id": "id" } } } ``` ## Create a task `client.Task.New(ctx, body) (*TaskCreateResponse, error)` **post** `/v1/tasks` Creates a new task record. The `$title` and `$status` fields and the `$assignedTo` relationship are required. If `$createdBy` is omitted it defaults to the authenticated user. The `$note` relationship is read-only — manage notes via their own relationships. Supports idempotency via the `Idempotency-Key` header. **[Required scope](/using-the-api/scopes/):** `tasks:create` **[Rate limit category](/using-the-api/rate-limits/):** Write ### Parameters - `body TaskNewParams` - `Fields param.Field[TaskNewParamsFields]` Field values for the new task. Tasks only support the documented system fields, all prefixed with `$` (e.g. `$title`, `$status`). Required: `$title` (string) and `$status` (one of `TODO`, `IN_PROGRESS`, `COMPLETE`, `CANCELLED`). Call the [definitions endpoint](/api/resources/task/methods/definitions) to discover the available fields. See [Fields and relationships](/using-the-api/fields-and-relationships/) for value type details. - `Status string` Task status. One of: `TODO`, `IN_PROGRESS`, `COMPLETE`, `CANCELLED`. - `Title string` Title of the task. - `Description string` Description of the task in markdown format. - `DueAt string` Due date as an ISO 8601 datetime string. - `Relationships param.Field[map[string, TaskNewParamsRelationshipUnion]]` Relationships to set on the new task. System relationships use a `$` prefix (e.g. `$account`, `$assignedTo`); custom relationships use their bare slug. `$assignedTo` is required. Each value is a single entity ID or an array of IDs. Call the [definitions endpoint](/api/resources/task/methods/definitions) to list available relationship keys. - `map[string, TaskNewParamsRelationshipUnion]` - `string` - `type TaskNewParamsRelationshipArray []string` ### Returns - `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. - `string` - `float64` - `bool` - `type TaskCreateResponseFieldValueArray []string` - `type TaskCreateResponseFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type TaskCreateResponseFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `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"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `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 string` External identifier for the entity, or null if unset. ### Example ```go package main import ( "context" "fmt" "github.com/Lightfld/lightfield-go" "github.com/Lightfld/lightfield-go/option" ) func main() { client := githubcomlightfldlightfieldgo.NewClient( option.WithAPIKey("My API Key"), ) taskCreateResponse, err := client.Task.New(context.TODO(), githubcomlightfldlightfieldgo.TaskNewParams{ Fields: githubcomlightfldlightfieldgo.TaskNewParamsFields{ Status: "$status", Title: "$title", }, Relationships: map[string]githubcomlightfldlightfieldgo.TaskNewParamsRelationshipUnion{ "foo": githubcomlightfldlightfieldgo.TaskNewParamsRelationshipUnion{ OfString: githubcomlightfldlightfieldgo.String("string"), }, }, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", taskCreateResponse.ID) } ``` #### Response ```json { "id": "id", "createdAt": "createdAt", "fields": { "foo": { "value": "string", "valueType": "ADDRESS" } }, "httpLink": "httpLink", "relationships": { "foo": { "cardinality": "cardinality", "objectType": "objectType", "values": [ "string" ] } }, "updatedAt": "updatedAt", "externalId": "externalId" } ``` ## Update a task `client.Task.Update(ctx, id, body) (*TaskUpdateResponse, error)` **post** `/v1/tasks/{id}` Updates an existing task by ID. Only included fields and relationships are modified. The `$note` relationship is read-only — manage notes via their own relationships. Supports idempotency via the `Idempotency-Key` header. **[Required scope](/using-the-api/scopes/):** `tasks:update` **[Rate limit category](/using-the-api/rate-limits/):** Write ### Parameters - `id string` Unique identifier of the task to update. - `body TaskUpdateParams` - `Fields param.Field[TaskUpdateParamsFields]` Field values to update — only provided fields are modified; omitted fields are left unchanged. Tasks only support the documented system fields, all prefixed with `$` (e.g. `$title`, `$status`). Call the [definitions endpoint](/api/resources/task/methods/definitions) for available fields. See [Fields and relationships](/using-the-api/fields-and-relationships/) for value type details. - `Description string` Description of the task in markdown format. - `DueAt string` Due date as an ISO 8601 datetime string. - `Status string` Task status. One of: `TODO`, `IN_PROGRESS`, `COMPLETE`, `CANCELLED`. - `Title string` Title of the task. - `Relationships param.Field[map[string, TaskUpdateParamsRelationship]]` Relationship operations to apply. System relationships use a `$` prefix (e.g. `$account`, `$assignedTo`). Each value is an operation object with `add`, `remove`, or `replace`. - `map[string, TaskUpdateParamsRelationship]` - `Add TaskUpdateParamsRelationshipAddUnion` Entity ID(s) to add to the relationship. - `string` - `type TaskUpdateParamsRelationshipAddArray []string` - `Remove TaskUpdateParamsRelationshipRemoveUnion` Entity ID(s) to remove from the relationship. - `string` - `type TaskUpdateParamsRelationshipRemoveArray []string` - `Replace TaskUpdateParamsRelationshipReplaceUnion` Entity ID(s) to set as the entire relationship, replacing all existing associations. - `string` - `type TaskUpdateParamsRelationshipReplaceArray []string` ### Returns - `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. - `string` - `float64` - `bool` - `type TaskUpdateResponseFieldValueArray []string` - `type TaskUpdateResponseFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type TaskUpdateResponseFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `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"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `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 string` External identifier for the entity, or null if unset. ### Example ```go package main import ( "context" "fmt" "github.com/Lightfld/lightfield-go" "github.com/Lightfld/lightfield-go/option" ) func main() { client := githubcomlightfldlightfieldgo.NewClient( option.WithAPIKey("My API Key"), ) taskUpdateResponse, err := client.Task.Update( context.TODO(), "id", githubcomlightfldlightfieldgo.TaskUpdateParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", taskUpdateResponse.ID) } ``` #### Response ```json { "id": "id", "createdAt": "createdAt", "fields": { "foo": { "value": "string", "valueType": "ADDRESS" } }, "httpLink": "httpLink", "relationships": { "foo": { "cardinality": "cardinality", "objectType": "objectType", "values": [ "string" ] } }, "updatedAt": "updatedAt", "externalId": "externalId" } ``` ## Retrieve a task `client.Task.Get(ctx, id) (*TaskRetrieveResponse, error)` **get** `/v1/tasks/{id}` Retrieves a single task by its ID. **[Required scope](/using-the-api/scopes/):** `tasks:read` **[Rate limit category](/using-the-api/rate-limits/):** Read ### Parameters - `id string` Unique identifier of the task to retrieve. ### Returns - `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. - `string` - `float64` - `bool` - `type TaskRetrieveResponseFieldValueArray []string` - `type TaskRetrieveResponseFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type TaskRetrieveResponseFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `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"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `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 string` External identifier for the entity, or null if unset. ### Example ```go package main import ( "context" "fmt" "github.com/Lightfld/lightfield-go" "github.com/Lightfld/lightfield-go/option" ) func main() { client := githubcomlightfldlightfieldgo.NewClient( option.WithAPIKey("My API Key"), ) taskRetrieveResponse, err := client.Task.Get(context.TODO(), "id") if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", taskRetrieveResponse.ID) } ``` #### Response ```json { "id": "id", "createdAt": "createdAt", "fields": { "foo": { "value": "string", "valueType": "ADDRESS" } }, "httpLink": "httpLink", "relationships": { "foo": { "cardinality": "cardinality", "objectType": "objectType", "values": [ "string" ] } }, "updatedAt": "updatedAt", "externalId": "externalId" } ``` ## List tasks `client.Task.List(ctx, query) (*TaskListResponse, error)` **get** `/v1/tasks` Returns a paginated list of tasks. Use `offset` and `limit` to paginate through results. See [List endpoints](/using-the-api/list-endpoints/) for more information about pagination. **[Required scope](/using-the-api/scopes/):** `tasks:read` **[Rate limit category](/using-the-api/rate-limits/):** Search ### Parameters - `query TaskListParams` - `Limit param.Field[int64]` Maximum number of records to return. Defaults to 25, maximum 25. - `Offset param.Field[int64]` Number of records to skip for pagination. Defaults to 0. ### Returns - `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. - `string` - `float64` - `bool` - `type TaskListResponseDataFieldValueArray []string` - `type TaskListResponseDataFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type TaskListResponseDataFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `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"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `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 string` 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. ### Example ```go package main import ( "context" "fmt" "github.com/Lightfld/lightfield-go" "github.com/Lightfld/lightfield-go/option" ) func main() { client := githubcomlightfldlightfieldgo.NewClient( option.WithAPIKey("My API Key"), ) taskListResponse, err := client.Task.List(context.TODO(), githubcomlightfldlightfieldgo.TaskListParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", taskListResponse.Data) } ``` #### Response ```json { "data": [ { "id": "id", "createdAt": "createdAt", "fields": { "foo": { "value": "string", "valueType": "ADDRESS" } }, "httpLink": "httpLink", "relationships": { "foo": { "cardinality": "cardinality", "objectType": "objectType", "values": [ "string" ] } }, "updatedAt": "updatedAt", "externalId": "externalId" } ], "object": "object", "totalCount": 0 } ``` ## Domain Types ### Task Create Response - `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. - `string` - `float64` - `bool` - `type TaskCreateResponseFieldValueArray []string` - `type TaskCreateResponseFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type TaskCreateResponseFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `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"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `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 string` External identifier for the entity, or null if unset. ### Task Definitions Response - `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 string` ISO 4217 3-letter currency code. - `HandleService string` Social platform associated with this handle field. - `const TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceTwitter TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "TWITTER"` - `const TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceLinkedin TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "LINKEDIN"` - `const TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceFacebook TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "FACEBOOK"` - `const TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceInstagram TaskDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "INSTAGRAM"` - `MultipleValues bool` Whether this field accepts multiple values. - `Options []TaskDefinitionsResponseFieldDefinitionTypeConfigurationOption` Available options for select fields. - `ID string` Unique identifier of the select option. - `Label string` Human-readable display name of the option. - `Description string` Description of the option, or null. - `Unique bool` Whether values for this field must be unique. - `ValueType string` Data type of the field. - `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 string` Unique identifier of the field definition. - `ReadOnly bool` `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. - `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 string` Unique identifier of the relationship definition. ### Task List Response - `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. - `string` - `float64` - `bool` - `type TaskListResponseDataFieldValueArray []string` - `type TaskListResponseDataFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type TaskListResponseDataFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `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"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `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 string` 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. ### Task Retrieve Response - `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. - `string` - `float64` - `bool` - `type TaskRetrieveResponseFieldValueArray []string` - `type TaskRetrieveResponseFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type TaskRetrieveResponseFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `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"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `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 string` External identifier for the entity, or null if unset. ### Task Update Response - `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. - `string` - `float64` - `bool` - `type TaskUpdateResponseFieldValueArray []string` - `type TaskUpdateResponseFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type TaskUpdateResponseFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `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"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `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 string` External identifier for the entity, or null if unset.