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.

Description stringOptional

Optional description of what this list is for. Pass null to clear.

Kind stringOptional

Product-level list purpose. Normally leave unset; reserve target for the single account-prioritization (APG) demand list per org (account/contact lists only). Pass null to clear.

Name stringOptional

Display name of the list.

Relationships param.Field[ListUpdateParamsRelationships]Optional

Relationship operations. Use the key matching the list’s $objectType (e.g. $accounts for an account list).

Accounts ListUpdateParamsRelationshipsAccountsOptional

Add/remove accounts. List $objectType must be account.

Add ListUpdateParamsRelationshipsAccountsAddUnionOptional

Entity ID(s) to add to the list.

One of the following:
string
type ListUpdateParamsRelationshipsAccountsAddArray []string
Remove ListUpdateParamsRelationshipsAccountsRemoveUnionOptional

Entity ID(s) to remove from the list.

One of the following:
string
type ListUpdateParamsRelationshipsAccountsRemoveArray []string
Contacts ListUpdateParamsRelationshipsContactsOptional

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

Add ListUpdateParamsRelationshipsContactsAddUnionOptional

Entity ID(s) to add to the list.

One of the following:
string
type ListUpdateParamsRelationshipsContactsAddArray []string
Remove ListUpdateParamsRelationshipsContactsRemoveUnionOptional

Entity ID(s) to remove from the list.

One of the following:
string
type ListUpdateParamsRelationshipsContactsRemoveArray []string
Opportunities ListUpdateParamsRelationshipsOpportunitiesOptional

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

Add ListUpdateParamsRelationshipsOpportunitiesAddUnionOptional

Entity ID(s) to add to the list.

One of the following:
string
type ListUpdateParamsRelationshipsOpportunitiesAddArray []string
Remove ListUpdateParamsRelationshipsOpportunitiesRemoveUnionOptional

Entity ID(s) to remove from the list.

One of the following:
string
type ListUpdateParamsRelationshipsOpportunitiesRemoveArray []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"
const ListUpdateResponseFieldValueTypeHTML ListUpdateResponseFieldValueType = "HTML"

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"
}