The label of the menu item
Ordering index
The URL to which the menu item points to
Opens link in new tab (used together with external_url
)
item type associated with the menu item
Parent menu item
const SiteClient = require('datocms-client').SiteClient;const client = new SiteClient('YOUR-API-TOKEN');const menuItemId = '34';client.menuItem.update(menuItemId, {label: 'Posts',externalUrl: '',position: 1,openInNewTab: true,itemType: '44',parent: null}).then((menuItem) => {console.log(menuItem);}).catch((error) => {console.error(error);});
> node example.js{"id": "34","label": "Posts","externalUrl": "","position": 1,"openInNewTab": true,"itemType": "44","parent": null,"children": ["34"]}