Create a list
client.list.create(ListCreateParams { fields, relationships } body, RequestOptionsoptions?): ListCreateResponse { id, createdAt, fields, httpLink }
POST/v1/lists
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
Parameters
Returns
Create a list
import Lightfield from 'lightfield';
const client = new Lightfield({
apiKey: 'My API Key',
});
const listCreateResponse = await client.list.create({
fields: { $name: '$name', $objectType: 'account' },
});
console.log(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"
}