Creates a new list. The $name and $objectType fields are required.
Supports idempotency via the Idempotency-Key header.
Required scope: lists:create
Rate limit category: Write
Create 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"),
)
listCreateResponse, err := client.List.New(context.TODO(), githubcomlightfldlightfieldgo.ListNewParams{
Fields: githubcomlightfldlightfieldgo.ListNewParamsFields{
Name: "$name",
ObjectType: "account",
},
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", listCreateResponse.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"
}