> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.gorilladash.com/gorilla-dash-rest-ful-api/website-content/menus/create-menu/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.gorilladash.com/_mcp/server. # Create Menu POST https://api.gorilladash.com/api/v1/website-content/websites/%7BWEBSITE_ID%7D/menus Content-Type: application/json Creates a menu. Needs a key with **Website Content: Read and Write** (`website-content:write`). | Field | Type | Rules | | --- | --- | --- | | `name` | string | Required, max 255, unique within the website. | | `items` | array | Required on create and upsert. Up to 200 items per level, 4 levels deep and 500 items in total. | | `items.*.label` | string | Required, max 255. | | `items.*.url` | string\|null | Max 255. Must start with `/`, `http://`, `https://`, `mailto:` or `tel:`. | | `items.*.page_id` | integer\|null | A page of this website. | | `items.*.children` | array\|null | The 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. Reference: https://docs.gorilladash.com/gorilla-dash-rest-ful-api/website-content/menus/create-menu ## Request ### Headers - `GorillaDash-Api-Key` (string, optional) — Gorilla Dash API Key - `GorillaDash-Api-Secret` (string, optional) — Gorilla Dash API Secret ### Body (application/json) This endpoint expects an object. - `name` (string, required) - `items` (list of ApiV1WebsiteContentWebsites7BwebsiteId7DMenusPostRequestBodyContentApplicationJsonSchemaItemsItems, required) ## Response ### 201 Created - `success` (boolean, required) - `status` (integer, required) - `data` (ApiV1WebsiteContentWebsites7BwebsiteId7DMenusPostResponsesContentApplicationJsonSchemaData, required) ## Errors ### 403 Forbidden Error Forbidden - `message` (string, required) ## Types ### ApiV1WebsiteContentWebsites7BwebsiteId7DMenusPostRequestBodyContentApplicationJsonSchemaItemsItems - `label` (string, required) - `url` (string, required) - `children` (list of ApiV1WebsiteContentWebsites7BwebsiteId7DMenusPostRequestBodyContentApplicationJsonSchemaItemsItemsChildrenItems, required) ### ApiV1WebsiteContentWebsites7BwebsiteId7DMenusPostResponsesContentApplicationJsonSchemaData - `id` (integer, required) - `website_id` (integer, required) - `name` (string, required) - `created_at` (datetime, required) - `updated_at` (datetime, required) - `items` (list of ApiV1WebsiteContentWebsites7BwebsiteId7DMenusPostResponsesContentApplicationJsonSchemaDataItemsItems, required) ### ApiV1WebsiteContentWebsites7BwebsiteId7DMenusPostRequestBodyContentApplicationJsonSchemaItemsItemsChildrenItems - `label` (string, required) - `url` (string, required) ### ApiV1WebsiteContentWebsites7BwebsiteId7DMenusPostResponsesContentApplicationJsonSchemaDataItemsItems - `id` (integer, required) - `label` (string, required) - `type` (string, required) - `page_id` (integer, required) - `page_slug` (string, required) - `children` (list of ApiV1WebsiteContentWebsites7BwebsiteId7DMenusPostResponsesContentApplicationJsonSchemaDataItemsItemsChildrenItems, required) - `url` (any, optional) ### ApiV1WebsiteContentWebsites7BwebsiteId7DMenusPostResponsesContentApplicationJsonSchemaDataItemsItemsChildrenItems - `id` (integer, required) - `label` (string, required) - `type` (string, required) - `page_id` (integer, required) - `page_slug` (string, required) - `children` (list of any, required) - `url` (any, optional) ## Examples **Request** ```json { "name": "Main Menu", "items": [ { "label": "About", "url": "/about/", "children": [ { "label": "Board", "url": "/about/board-of-directors" }, { "label": "Old page", "url": "/not-imported/" } ] }, { "label": "Join", "url": "https://join.example.org/", "children": [ { "label": "string", "url": "string" } ] }, { "label": "Resources", "url": "string", "children": [ { "label": "string", "url": "string" } ] } ] } ``` **Response** ```json { "success": true, "status": 201, "data": { "id": 341, "website_id": 206, "name": "Main Menu", "created_at": "2026-10-07T01:20:00+00:00", "updated_at": "2026-10-07T01:20:00+00:00", "items": [ { "id": 9001, "label": "About", "type": "page", "page_id": 5520, "page_slug": "about", "children": [ { "id": 9002, "label": "Board", "type": "page", "page_id": 5521, "page_slug": "about/board-of-directors", "children": [] }, { "id": 9003, "label": "Old page", "type": "internal_url", "page_id": 1, "page_slug": "string", "children": [], "url": null } ] }, { "id": 9004, "label": "Join", "type": "external_url", "page_id": 1, "page_slug": "string", "children": [], "url": null }, { "id": 9005, "label": "Resources", "type": "placeholder", "page_id": 1, "page_slug": "string", "children": [] } ] } } ``` **SDK Code** ```python Website Content_Menus_Create Menu_example import requests url = "https://api.gorilladash.com/api/v1/website-content/websites/%7BWEBSITE_ID%7D/menus" payload = { "name": "Main Menu", "items": [ { "label": "About", "url": "/about/", "children": [ { "label": "Board", "url": "/about/board-of-directors" }, { "label": "Old page", "url": "/not-imported/" } ] }, { "label": "Join", "url": "https://join.example.org/", "children": [ { "label": "string", "url": "string" } ] }, { "label": "Resources", "url": "string", "children": [ { "label": "string", "url": "string" } ] } ] } headers = { "GorillaDash-Api-Key": "{{API_KEY}}", "GorillaDash-Api-Secret": "{{GD_RESTFUL_SECRET}}", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Website Content_Menus_Create Menu_example const url = 'https://api.gorilladash.com/api/v1/website-content/websites/%7BWEBSITE_ID%7D/menus'; const options = { method: 'POST', headers: { 'GorillaDash-Api-Key': '{{API_KEY}}', 'GorillaDash-Api-Secret': '{{GD_RESTFUL_SECRET}}', 'Content-Type': 'application/json' }, body: '{"name":"Main Menu","items":[{"label":"About","url":"/about/","children":[{"label":"Board","url":"/about/board-of-directors"},{"label":"Old page","url":"/not-imported/"}]},{"label":"Join","url":"https://join.example.org/","children":[{"label":"string","url":"string"}]},{"label":"Resources","url":"string","children":[{"label":"string","url":"string"}]}]}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Website Content_Menus_Create Menu_example package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.gorilladash.com/api/v1/website-content/websites/%7BWEBSITE_ID%7D/menus" payload := strings.NewReader("{\n \"name\": \"Main Menu\",\n \"items\": [\n {\n \"label\": \"About\",\n \"url\": \"/about/\",\n \"children\": [\n {\n \"label\": \"Board\",\n \"url\": \"/about/board-of-directors\"\n },\n {\n \"label\": \"Old page\",\n \"url\": \"/not-imported/\"\n }\n ]\n },\n {\n \"label\": \"Join\",\n \"url\": \"https://join.example.org/\",\n \"children\": [\n {\n \"label\": \"string\",\n \"url\": \"string\"\n }\n ]\n },\n {\n \"label\": \"Resources\",\n \"url\": \"string\",\n \"children\": [\n {\n \"label\": \"string\",\n \"url\": \"string\"\n }\n ]\n }\n ]\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("GorillaDash-Api-Key", "{{API_KEY}}") req.Header.Add("GorillaDash-Api-Secret", "{{GD_RESTFUL_SECRET}}") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Website Content_Menus_Create Menu_example require 'uri' require 'net/http' url = URI("https://api.gorilladash.com/api/v1/website-content/websites/%7BWEBSITE_ID%7D/menus") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["GorillaDash-Api-Key"] = '{{API_KEY}}' request["GorillaDash-Api-Secret"] = '{{GD_RESTFUL_SECRET}}' request["Content-Type"] = 'application/json' request.body = "{\n \"name\": \"Main Menu\",\n \"items\": [\n {\n \"label\": \"About\",\n \"url\": \"/about/\",\n \"children\": [\n {\n \"label\": \"Board\",\n \"url\": \"/about/board-of-directors\"\n },\n {\n \"label\": \"Old page\",\n \"url\": \"/not-imported/\"\n }\n ]\n },\n {\n \"label\": \"Join\",\n \"url\": \"https://join.example.org/\",\n \"children\": [\n {\n \"label\": \"string\",\n \"url\": \"string\"\n }\n ]\n },\n {\n \"label\": \"Resources\",\n \"url\": \"string\",\n \"children\": [\n {\n \"label\": \"string\",\n \"url\": \"string\"\n }\n ]\n }\n ]\n}" response = http.request(request) puts response.read_body ``` ```java Website Content_Menus_Create Menu_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.gorilladash.com/api/v1/website-content/websites/%7BWEBSITE_ID%7D/menus") .header("GorillaDash-Api-Key", "{{API_KEY}}") .header("GorillaDash-Api-Secret", "{{GD_RESTFUL_SECRET}}") .header("Content-Type", "application/json") .body("{\n \"name\": \"Main Menu\",\n \"items\": [\n {\n \"label\": \"About\",\n \"url\": \"/about/\",\n \"children\": [\n {\n \"label\": \"Board\",\n \"url\": \"/about/board-of-directors\"\n },\n {\n \"label\": \"Old page\",\n \"url\": \"/not-imported/\"\n }\n ]\n },\n {\n \"label\": \"Join\",\n \"url\": \"https://join.example.org/\",\n \"children\": [\n {\n \"label\": \"string\",\n \"url\": \"string\"\n }\n ]\n },\n {\n \"label\": \"Resources\",\n \"url\": \"string\",\n \"children\": [\n {\n \"label\": \"string\",\n \"url\": \"string\"\n }\n ]\n }\n ]\n}") .asString(); ``` ```php Website Content_Menus_Create Menu_example request('POST', 'https://api.gorilladash.com/api/v1/website-content/websites/%7BWEBSITE_ID%7D/menus', [ 'body' => '{ "name": "Main Menu", "items": [ { "label": "About", "url": "/about/", "children": [ { "label": "Board", "url": "/about/board-of-directors" }, { "label": "Old page", "url": "/not-imported/" } ] }, { "label": "Join", "url": "https://join.example.org/", "children": [ { "label": "string", "url": "string" } ] }, { "label": "Resources", "url": "string", "children": [ { "label": "string", "url": "string" } ] } ] }', 'headers' => [ 'Content-Type' => 'application/json', 'GorillaDash-Api-Key' => '{{API_KEY}}', 'GorillaDash-Api-Secret' => '{{GD_RESTFUL_SECRET}}', ], ]); echo $response->getBody(); ``` ```csharp Website Content_Menus_Create Menu_example using RestSharp; var client = new RestClient("https://api.gorilladash.com/api/v1/website-content/websites/%7BWEBSITE_ID%7D/menus"); var request = new RestRequest(Method.POST); request.AddHeader("GorillaDash-Api-Key", "{{API_KEY}}"); request.AddHeader("GorillaDash-Api-Secret", "{{GD_RESTFUL_SECRET}}"); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"name\": \"Main Menu\",\n \"items\": [\n {\n \"label\": \"About\",\n \"url\": \"/about/\",\n \"children\": [\n {\n \"label\": \"Board\",\n \"url\": \"/about/board-of-directors\"\n },\n {\n \"label\": \"Old page\",\n \"url\": \"/not-imported/\"\n }\n ]\n },\n {\n \"label\": \"Join\",\n \"url\": \"https://join.example.org/\",\n \"children\": [\n {\n \"label\": \"string\",\n \"url\": \"string\"\n }\n ]\n },\n {\n \"label\": \"Resources\",\n \"url\": \"string\",\n \"children\": [\n {\n \"label\": \"string\",\n \"url\": \"string\"\n }\n ]\n }\n ]\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Website Content_Menus_Create Menu_example import Foundation let headers = [ "GorillaDash-Api-Key": "{{API_KEY}}", "GorillaDash-Api-Secret": "{{GD_RESTFUL_SECRET}}", "Content-Type": "application/json" ] let parameters = [ "name": "Main Menu", "items": [ [ "label": "About", "url": "/about/", "children": [ [ "label": "Board", "url": "/about/board-of-directors" ], [ "label": "Old page", "url": "/not-imported/" ] ] ], [ "label": "Join", "url": "https://join.example.org/", "children": [ [ "label": "string", "url": "string" ] ] ], [ "label": "Resources", "url": "string", "children": [ [ "label": "string", "url": "string" ] ] ] ] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.gorilladash.com/api/v1/website-content/websites/%7BWEBSITE_ID%7D/menus")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```