Show examples in:
    Create a new fieldset


    title  string  Required

    The title of the fieldset

    hint  string, null  Optional

    Description/contextual hint for the fieldset

    position  integer  Optional

    Ordering index

    collapsible  boolean  Optional

    Whether the fieldset can be collapsed or not

    start_collapsed  boolean  Optional

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


    Returns a fieldset resource object.


    Example code:
    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',
    hint: 'Please fill in these fields!',
    position: 1,
    collapsible: true,
    start_collapsed: false
    Returned output:
    id: '124',
    title: 'SEO-related fields',
    hint: 'Please fill in these fields!',
    collapsible: true,
    start_collapsed: false,
    position: 1,
    item_type: {
    type: 'item_type',
    id: '44'