Skip to main content
POST
Create Menu

Create Menu

Adds a link to one of the store’s navigation menus. The request body may be sent flat or wrapped in a menu object.
One record = one link. A store’s menus are built from menu records: every record is one top-level link, and all records with the same menuType form one storefront menu, whose handle is the menuType in lowercase — records with menuType: "Footer" are the links of linklists.footer in themes. A record’s child array holds that link’s sub-links. To add a link to an existing menu, create a record with that menu’s menuType; to remove one, delete its record.

Request

Body Parameters

string
required
The link’s title
string
required
The menu the link belongs to, e.g. Header or Footer (the menu’s handle is this value in lowercase)
string
required
What the link points to: page, product, category (a collection), blog, or customized link (any url)
string
URL-safe handle
string
URL for the menu item
array
The link’s sub-links (dropdown items), each an object with name, url and menuItemType, and its own child for a further level.
string
ID of the parent menu, when creating a nested item
integer
default:"0"
Display order

Response

Returns the standard response envelope with status 201. The data object contains a menu property holding the created menu record.

Example Response

Error Response

When a required field is missing: