Show examples in:
    Update a schema menu item

    Body Parameters

    label  Optional  null, string  Example: "Posts"

    The label of the schema menu item (only present when the schema menu item is not linked to an item type)

    position  Optional  integer  Example: 1

    Ordering index

    kind  Optional  enum  Example: "item_type"

    Indicates if the schema menu item refers to an item type or a modular block

    item_type  Optional  { type: "item_type", id: }, null

    Item type associated with the menu item

    parent  Optional  null, { type: "schema_menu_item", id: }

    Parent schema menu item

    children  Optional  Array of { type: "schema_menu_item", id: }

    Underlying schema menu items


    Returns a schema_menu_item resource object.


    Example Basic example
    import { buildClient } from '@datocms/cma-client-node';
    async function run() {
    const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });
    const schemaMenuItemId = 'uinr2zfqQLeCo_1O0-ao-Q';
    const schemaMenuItem = await client.schemaMenuItems.update(schemaMenuItemId, {});