Skip to main content
PUT
/
api
/
v1
/
menus
/
:id.json
Update Menu
curl --request PUT \
  --url https://api.launchmystore.io/api/v1/menus/:id.json \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "handle": "<string>",
  "links": [
    {
      "id": "<string>",
      "title": "<string>",
      "url": "<string>",
      "type": "<string>",
      "links": [
        {}
      ]
    }
  ]
}
'
{
  "success": true,
  "data": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt

Use this file to discover all available pages before exploring further.

Update Menu

Updates an existing navigation menu. You can update the title, handle, and completely replace the links array.

Request

curl -X PUT "https://api.launchmystore.io/api/v1/menus/menu_abc123.json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Primary Navigation",
    "links": [
      {
        "title": "Home",
        "url": "/",
        "type": "http"
      },
      {
        "title": "New Arrivals",
        "url": "/collections/new-arrivals",
        "type": "collection"
      },
      {
        "title": "Sale",
        "url": "/collections/sale",
        "type": "collection"
      }
    ]
  }'

Path Parameters

id
string
required
The unique menu ID to update

Body Parameters

All parameters are optional. Only provided fields will be updated.
title
string
The menu title
handle
string
URL-safe handle
Complete replacement of menu links. Provide the full links array - existing links not in the array will be removed.

Response

success
boolean
Whether the request succeeded
data
object
The updated menu object

Example Response

{
  "success": true,
  "data": {
    "id": "menu_abc123",
    "title": "Primary Navigation",
    "handle": "main-menu",
    "links": [
      {
        "id": "link_upd001",
        "title": "Home",
        "url": "/",
        "type": "http",
        "resource_id": null,
        "position": 1,
        "links": []
      },
      {
        "id": "link_upd002",
        "title": "New Arrivals",
        "url": "/collections/new-arrivals",
        "type": "collection",
        "resource_id": "col_new",
        "position": 2,
        "links": []
      },
      {
        "id": "link_upd003",
        "title": "Sale",
        "url": "/collections/sale",
        "type": "collection",
        "resource_id": "col_sale",
        "position": 3,
        "links": []
      }
    ],
    "created_at": "2024-01-01T10:00:00Z",
    "updated_at": "2024-03-20T15:30:00Z"
  }
}

Notes

  • The links array is a complete replacement - existing links not included will be deleted
  • To preserve existing links, include their id in the update
  • Links are automatically assigned positions based on their array order
  • Changing the handle may affect theme templates that reference menus by handle

Error Codes

CodeDescription
UNAUTHORIZEDInvalid or missing access token
FORBIDDENApp doesn’t have write_content scope
NOT_FOUNDMenu with the specified ID does not exist
VALIDATION_ERRORInvalid request body (see error details)
DUPLICATE_HANDLEA menu with this handle already exists