Sorry, no results found for "".
RFC 4122 UUID of menu item expressed in URL-safe base64 format
"uinr2zfqQLeCo_1O0-ao-Q"
Must be exactly "menu_item"
.
The label of the menu item
"Posts"
The URL to which the menu item points to
Ordering index
1
Opens link in new tab (to be used together with external_url
)
Item type associated with the menu item
Item type filter associated with the menu item (to be used together with item_type
relationship)
Returns a resource object of type menu_item.
POST https://site-api.datocms.com/menu-items HTTP/1.1Authorization: Bearer YOUR-API-TOKENAccept: application/jsonX-Api-Version: 3Content-Type: application/vnd.api+json
{ "data": { "type": "menu_item", "attributes": { "label": "Posts" } }}
curl -g 'https://site-api.datocms.com/menu-items' \ -X POST \ -H "Authorization: Bearer YOUR-API-TOKEN" \ -H "Accept: application/json" \ -H "X-Api-Version: 3" \ -H "Content-Type: application/vnd.api+json" \ --data-binary '{"data":{"type":"menu_item","attributes":{"label":"Posts"}}}'
await fetch("https://site-api.datocms.com/menu-items", { method: "POST", headers: { Authorization: "Bearer YOUR-API-TOKEN", Accept: "application/json", "X-Api-Version": "3", "Content-Type": "application/vnd.api+json", }, body: JSON.stringify({ data: { type: "menu_item", attributes: { label: "Posts" } }, }),});
HTTP/1.1 200 OKContent-Type: application/jsonCache-Control: cache-control: max-age=0, private, must-revalidateX-RateLimit-Limit: 30X-RateLimit-Remaining: 28
{ "data": { "type": "menu_item", "id": "uinr2zfqQLeCo_1O0-ao-Q", "relationships": { "item_type": { "data": { "type": "item_type", "id": "DxMaW10UQiCmZcuuA-IkkA" } }, "item_type_filter": { "data": { "type": "item_type_filter", "id": "FF-P5of6Qp-DD2w0xoaa6Q" } }, "parent": { "data": null }, "children": { "data": [ { "type": "menu_item", "id": "uinr2zfqQLeCo_1O0-ao-Q" } ] } }, "attributes": { "label": "Posts", "position": 1, "external_url": "", "open_in_new_tab": true } }}