Home
Content Management API⁡𝅶‍‍𝅺⁡‍𝅴⁡𝅴𝅹‍‍⁢𝅵‍‍⁣⁣‌⁡⁣𝅺⁣⁢⁣𝅸⁠⁢‍‍‍𝅷‍‍𝅳⁡‍⁠‍‍⁢𝅵‍‍𝅳⁡⁣⁡⁣⁡​⁡⁢⁢𝅵‍𝅺‍𝅺⁢𝅸⁡⁢‍𝅹⁣‌⁡⁣𝅺⁢𝅸⁡⁢‍𝅹⁢𝅺𝅸‍𝅺⁠⁣𝅴⁡⁣𝅺⁡‍‍𝅺𝅴⁡⁣⁠𝅸⁠𝅺⁡⁣⁡𝅴⁡​⁠⁡⁢‍𝅺⁢𝅳⁢‌⁢​⁢𝅴⁢‍⁢⁠‍𝅺𝅴⁡⁣⁠𝅸⁡⁢‍𝅺⁢⁢⁢𝅴⁢𝅳⁢⁢⁢‌⁢⁡⁢𝅳⁢‌‍‍⁡𝅸
Main resources
Upload-related
Site Search
Environments
UI
Workflows
Async jobs
Roles & permissions
Webhooks
Hosting & CI integrations
Subscription
Enterprise
    Show examples in:
    Update a fieldset

    Parameters

    title  string  Optional

    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

    Returns a fieldset resource object.

    Examples

    Example code:
    import { buildClient } from '@datocms/cma-client-node';
    async function run() {
    const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });
    const fieldsetId = '124';
    const fieldset = await client.fieldsets.update(fieldsetId, {
    title: 'SEO-related fields',
    hint: 'Please fill in these fields!',
    position: 1,
    collapsible: true,
    start_collapsed: false
    });
    console.log(fieldset);
    }
    run();
    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'
    }
    }