Skip to navigation

Create Menu

View as Markdown

Creates a menu. Needs a key with Website Content: Read and Write (website-content:write).

FieldTypeRules
namestringRequired, max 255, unique within the website.
itemsarrayRequired on create and upsert. Up to 200 items per level, 4 levels deep and 500 items in total.
items.*.labelstringRequired, max 255.
items.*.urlstring|nullMax 255. Must start with /, http://, https://, mailto: or tel:.
items.*.page_idinteger|nullA page of this website.
items.*.childrenarray|nullThe same item shape.

How each item is stored:

  1. With page_id, it links to that page.
  2. Otherwise, a url that is the path of one of the website’s pages links to the page, so the link follows a later rename. The query string, a leading /index.php and slashes at either end are ignored, and / matches the homepage page.
  3. With no url, it is a heading with no link (placeholder).
  4. Any other path starting with / is kept as an internal URL.
  5. http(s)://, mailto: and tel: links are external URLs.

Send pages before menus so their links resolve to pages.

If a menu with the same name already exists, this returns 422. Use Upsert Menu when you do not know whether it exists.

Headers

GorillaDash-Api-KeystringOptional
Gorilla Dash API Key
GorillaDash-Api-SecretstringOptional
Gorilla Dash API Secret

Request

This endpoint expects an object.
namestringRequired
itemslist of objectsRequired

Response

Created
successboolean
statusinteger
dataobject

Errors

403
Forbidden Error