The title of the fieldset
Description/contextual hint for the fieldset
Ordering index
Whether the fieldset can be collapsed or not
When fieldset is collapsible, determines if the default is to start collapsed or not
const { SiteClient } = require('datocms-client');async function run() {const client = new SiteClient('YOUR-API-TOKEN');const modelIdOrApiKey = 'blog_post';const fieldset = await client.fieldset.create(modelIdOrApiKey, {title: 'SEO-related fields',hint: 'Please fill in these fields!',position: 1,collapsible: true,startCollapsed: false});console.log(fieldset);}run();
> node example.js{"id": "124","title": "SEO-related fields","hint": "Please fill in these fields!","collapsible": true,"startCollapsed": false,"position": 1,"itemType": "44"}