Show examples in:
Create a new fieldset

Body Parameters

id  string  Optional
RFC 4122 UUID of fieldset expressed in URL-safe base64 format
title  Required  string  Example: "SEO-related fields"

The title of the fieldset

hint  Optional  string, null  Example: "Please fill in these fields!"

Description/contextual hint for the fieldset

position  Optional  integer  Example: 1

Ordering index

collapsible  Optional  boolean  Example: true

Whether the fieldset can be collapsed or not

start_collapsed  Optional  boolean

When fieldset is collapsible, determines if the default is to start collapsed or not

Returns

Returns a fieldset resource object.

Examples

Example Basic example
import { buildClient } from '@datocms/cma-client-node';
async function run() {
const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });
const modelIdOrApiKey = 'blog_post';
const fieldset = await client.fieldsets.create(modelIdOrApiKey, {
title: 'SEO-related fields'
});
console.log(fieldset);
}
run();