## Update a list `client.List.Update(ctx, id, body) (*ListUpdateResponse, error)` **post** `/v1/lists/{id}` Updates an existing list by ID. Only included fields are modified. Supports idempotency via the `Idempotency-Key` header. **[Required scope](/using-the-api/scopes/):** `lists:update` **[Rate limit category](/using-the-api/rate-limits/):** Write ### Parameters - `id string` Unique identifier of the list to update. - `body ListUpdateParams` - `Fields param.Field[ListUpdateParamsFields]` Field values to update — only provided fields are modified; omitted fields are left unchanged. - `Name string` Display name of the list. - `Relationships param.Field[ListUpdateParamsRelationshipsUnion]` Relationship operations. Use the key matching the list's `$objectType` (e.g. `$accounts` for an account list). - `type ListUpdateParamsRelationshipsAccounts struct{…}` - `Accounts ListUpdateParamsRelationshipsAccountsAccounts` Add/remove accounts. List `$objectType` must be `account`. - `Add ListUpdateParamsRelationshipsAccountsAccountsAddUnion` Entity ID(s) to add to the list. - `string` - `type ListUpdateParamsRelationshipsAccountsAccountsAddArray []string` - `Remove ListUpdateParamsRelationshipsAccountsAccountsRemoveUnion` Entity ID(s) to remove from the list. - `string` - `type ListUpdateParamsRelationshipsAccountsAccountsRemoveArray []string` - `type ListUpdateParamsRelationshipsContacts struct{…}` - `Contacts ListUpdateParamsRelationshipsContactsContacts` Add/remove contacts. List `$objectType` must be `contact`. - `Add ListUpdateParamsRelationshipsContactsContactsAddUnion` Entity ID(s) to add to the list. - `string` - `type ListUpdateParamsRelationshipsContactsContactsAddArray []string` - `Remove ListUpdateParamsRelationshipsContactsContactsRemoveUnion` Entity ID(s) to remove from the list. - `string` - `type ListUpdateParamsRelationshipsContactsContactsRemoveArray []string` - `type ListUpdateParamsRelationshipsOpportunities struct{…}` - `Opportunities ListUpdateParamsRelationshipsOpportunitiesOpportunities` Add/remove opportunities. List `$objectType` must be `opportunity`. - `Add ListUpdateParamsRelationshipsOpportunitiesOpportunitiesAddUnion` Entity ID(s) to add to the list. - `string` - `type ListUpdateParamsRelationshipsOpportunitiesOpportunitiesAddArray []string` - `Remove ListUpdateParamsRelationshipsOpportunitiesOpportunitiesRemoveUnion` Entity ID(s) to remove from the list. - `string` - `type ListUpdateParamsRelationshipsOpportunitiesOpportunitiesRemoveArray []string` ### Returns - `type ListUpdateResponse struct{…}` - `ID string` Unique identifier for the list. - `CreatedAt string` ISO 8601 timestamp of when the list was created. - `Fields map[string, ListUpdateResponseField]` Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$objectType`). - `Value ListUpdateResponseFieldValueUnion` The field value, or null if unset. - `string` - `float64` - `bool` - `type ListUpdateResponseFieldValueArray []string` - `type ListUpdateResponseFieldValueAddress 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 ListUpdateResponseFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `const ListUpdateResponseFieldValueTypeAddress ListUpdateResponseFieldValueType = "ADDRESS"` - `const ListUpdateResponseFieldValueTypeCheckbox ListUpdateResponseFieldValueType = "CHECKBOX"` - `const ListUpdateResponseFieldValueTypeCurrency ListUpdateResponseFieldValueType = "CURRENCY"` - `const ListUpdateResponseFieldValueTypeDatetime ListUpdateResponseFieldValueType = "DATETIME"` - `const ListUpdateResponseFieldValueTypeEmail ListUpdateResponseFieldValueType = "EMAIL"` - `const ListUpdateResponseFieldValueTypeFullName ListUpdateResponseFieldValueType = "FULL_NAME"` - `const ListUpdateResponseFieldValueTypeMarkdown ListUpdateResponseFieldValueType = "MARKDOWN"` - `const ListUpdateResponseFieldValueTypeMultiSelect ListUpdateResponseFieldValueType = "MULTI_SELECT"` - `const ListUpdateResponseFieldValueTypeNumber ListUpdateResponseFieldValueType = "NUMBER"` - `const ListUpdateResponseFieldValueTypeSingleSelect ListUpdateResponseFieldValueType = "SINGLE_SELECT"` - `const ListUpdateResponseFieldValueTypeSocialHandle ListUpdateResponseFieldValueType = "SOCIAL_HANDLE"` - `const ListUpdateResponseFieldValueTypeTelephone ListUpdateResponseFieldValueType = "TELEPHONE"` - `const ListUpdateResponseFieldValueTypeText ListUpdateResponseFieldValueType = "TEXT"` - `const ListUpdateResponseFieldValueTypeURL ListUpdateResponseFieldValueType = "URL"` - `HTTPLink string` URL to view the list in the Lightfield web app, or null. ### 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"), ) listUpdateResponse, err := client.List.Update( context.TODO(), "id", githubcomlightfldlightfieldgo.ListUpdateParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", listUpdateResponse.ID) } ``` #### Response ```json { "id": "id", "createdAt": "createdAt", "fields": { "foo": { "value": "string", "valueType": "ADDRESS" } }, "httpLink": "httpLink" } ```