Skip to content

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: lists:update

Rate limit category: Write

ParametersExpand Collapse
id string

Unique identifier of the list to update.

body ListUpdateParams
Fields param.Field[ListUpdateParamsFields]Optional

Field values to update — only provided fields are modified; omitted fields are left unchanged.

Name stringOptional

Display name of the list.

Relationships param.Field[ListUpdateParamsRelationshipsUnion]Optional

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 ListUpdateParamsRelationshipsAccountsAccountsAddUnionOptional

Entity ID(s) to add to the list.

One of the following:
string
type ListUpdateParamsRelationshipsAccountsAccountsAddArray []string
Remove ListUpdateParamsRelationshipsAccountsAccountsRemoveUnionOptional

Entity ID(s) to remove from the list.

One of the following:
string
type ListUpdateParamsRelationshipsAccountsAccountsRemoveArray []string
type ListUpdateParamsRelationshipsContacts struct{…}
Contacts ListUpdateParamsRelationshipsContactsContacts

Add/remove contacts. List $objectType must be contact.

Add ListUpdateParamsRelationshipsContactsContactsAddUnionOptional

Entity ID(s) to add to the list.

One of the following:
string
type ListUpdateParamsRelationshipsContactsContactsAddArray []string
Remove ListUpdateParamsRelationshipsContactsContactsRemoveUnionOptional

Entity ID(s) to remove from the list.

One of the following:
string
type ListUpdateParamsRelationshipsContactsContactsRemoveArray []string
type ListUpdateParamsRelationshipsOpportunities struct{…}
Opportunities ListUpdateParamsRelationshipsOpportunitiesOpportunities

Add/remove opportunities. List $objectType must be opportunity.

Add ListUpdateParamsRelationshipsOpportunitiesOpportunitiesAddUnionOptional

Entity ID(s) to add to the list.

One of the following:
string
type ListUpdateParamsRelationshipsOpportunitiesOpportunitiesAddArray []string
Remove ListUpdateParamsRelationshipsOpportunitiesOpportunitiesRemoveUnionOptional

Entity ID(s) to remove from the list.

One of the following:
string
type ListUpdateParamsRelationshipsOpportunitiesOpportunitiesRemoveArray []string
ReturnsExpand Collapse
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.

One of the following:
string
float64
bool
type ListUpdateResponseFieldValueArray []string
type ListUpdateResponseFieldValueAddress 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 ListUpdateResponseFieldValueFullName 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 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"

Update a list

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)
}
{
  "id": "id",
  "createdAt": "createdAt",
  "fields": {
    "foo": {
      "value": "string",
      "valueType": "ADDRESS"
    }
  },
  "httpLink": "httpLink"
}
Returns Examples
{
  "id": "id",
  "createdAt": "createdAt",
  "fields": {
    "foo": {
      "value": "string",
      "valueType": "ADDRESS"
    }
  },
  "httpLink": "httpLink"
}