## Delete a list `client.List.Delete(ctx, id, body) (*ListDeleteResponse, error)` **delete** `/v1/lists/{id}` Moves a list to the trash. The list is soft-deleted and may be restored from the Lightfield UI. Member entities (accounts, contacts, or opportunities) are not affected. Calling delete on an already-trashed list is a no-op and returns the existing record. **[Required scope](/using-the-api/scopes/):** `lists:delete` **[Rate limit category](/using-the-api/rate-limits/):** Write ### Parameters - `id string` Unique identifier of the list to delete. - `body ListDeleteParams` - `Body param.Field[ListDeleteParamsBody]` ### Returns - `type ListDeleteResponse struct{…}` - `ID string` Unique identifier for the list. - `CreatedAt string` ISO 8601 timestamp of when the list was created. - `Fields map[string, ListDeleteResponseField]` Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$objectType`). - `Value ListDeleteResponseFieldValueUnion` The field value, or null if unset. - `string` - `float64` - `bool` - `type ListDeleteResponseFieldValueArray []string` - `type ListDeleteResponseFieldValueAddress 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 ListDeleteResponseFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `const ListDeleteResponseFieldValueTypeAddress ListDeleteResponseFieldValueType = "ADDRESS"` - `const ListDeleteResponseFieldValueTypeCheckbox ListDeleteResponseFieldValueType = "CHECKBOX"` - `const ListDeleteResponseFieldValueTypeCurrency ListDeleteResponseFieldValueType = "CURRENCY"` - `const ListDeleteResponseFieldValueTypeDatetime ListDeleteResponseFieldValueType = "DATETIME"` - `const ListDeleteResponseFieldValueTypeEmail ListDeleteResponseFieldValueType = "EMAIL"` - `const ListDeleteResponseFieldValueTypeFullName ListDeleteResponseFieldValueType = "FULL_NAME"` - `const ListDeleteResponseFieldValueTypeMarkdown ListDeleteResponseFieldValueType = "MARKDOWN"` - `const ListDeleteResponseFieldValueTypeMultiSelect ListDeleteResponseFieldValueType = "MULTI_SELECT"` - `const ListDeleteResponseFieldValueTypeNumber ListDeleteResponseFieldValueType = "NUMBER"` - `const ListDeleteResponseFieldValueTypeSingleSelect ListDeleteResponseFieldValueType = "SINGLE_SELECT"` - `const ListDeleteResponseFieldValueTypeSocialHandle ListDeleteResponseFieldValueType = "SOCIAL_HANDLE"` - `const ListDeleteResponseFieldValueTypeTelephone ListDeleteResponseFieldValueType = "TELEPHONE"` - `const ListDeleteResponseFieldValueTypeText ListDeleteResponseFieldValueType = "TEXT"` - `const ListDeleteResponseFieldValueTypeURL ListDeleteResponseFieldValueType = "URL"` - `const ListDeleteResponseFieldValueTypeHTML ListDeleteResponseFieldValueType = "HTML"` - `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"), ) listDeleteResponse, err := client.List.Delete( context.TODO(), "id", githubcomlightfldlightfieldgo.ListDeleteParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", listDeleteResponse.ID) } ``` #### Response ```json { "id": "id", "createdAt": "createdAt", "fields": { "foo": { "value": "string", "valueType": "ADDRESS" } }, "httpLink": "httpLink" } ```