Connect to the menu API
Usehttps://api.fluid.app with Authorization: Bearer <token> and Content-Type: application/json for JSON writes. These unversioned admin endpoints require company-admin access with menus.view for reads and menus.update for writes. Mist’s fluid_api tool supplies the active company’s authentication and admin client header.
Replace path placeholders with returned IDs. Menu writes affect shared store data immediately, independently of publishing theme files.
Create a menu
Send this body toPOST /api/menus. Use linkable_type: "Link" for custom URLs; menu creation requires an item type.
menu. The returned tree uses menu_items and nested sub_menu_items; _attributes keys are for writes.
Update or remove items
Send amenu wrapper to PUT /api/menus/:id. Within menu_items_attributes, omit id to create an item, include id to update it, or include id with _destroy: true to delete it. Apply the same rules recursively under sub_menu_items_attributes. Use IDs from a fresh menu read.
menu_item wrapper to PUT /api/menus/:menuId/menu_items/:itemId. Children still use sub_menu_items_attributes. Item reads and updates return a menu_item wrapper. Delete an entire menu with DELETE /api/menus/:id.
Find an existing menu
GET /api/menus accepts status (active or inactive), page, per_page, search_query, country_ids, and sorted_by. Use title_asc, title_desc, created_at_asc, or created_at_desc for sorting. Encode country arrays as country_ids[]=1&country_ids[]=2.
This admin endpoint uses flat page numbers, not cursor pagination. List responses contain menus and meta with total_count, total_pages, current_page, and per_page.
Connect the menu to your theme
List and read existing menus before creating another. After a write, read the menu again to verify its labels, destinations, ordering, and children. Use the returned menuslug as the value of a section’s link_list setting. Do not derive it from the title: older menus can return a null slug.
section.settings.menu.menu_items, using each item’s title and url. Check desktop and mobile navigation in preview before finishing.