API Reference - Menus

Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108110

← Back to API Reference | Getting Started

Menus

Menus define the navigation containers on your directory site. Each menu has a name, location identifier, optional custom CSS and code, and controls whether it is active. Menu items are managed separately via the Menu Items endpoint.

Model name in URL: menus — DB table: menus

The Menu Object

FieldTypeDescription
menu_idintegerUnique menu ID (primary key, read-only)
menu_namestringInternal machine-readable name for this menu (EG header_mini_nav); max 35 characters required on create
menu_titlestringHuman-readable display title for this menu (EG Top Header Menu) required on create
menu_locationstringTheme location or hook where this menu is rendered (EG header, footer)
menu_div_idstringHTML id attribute applied to the menu's wrapper element; max 60 characters
menu_div_classstringHTML class attribute applied to the menu's wrapper element; max 60 characters
menu_div_csstextCustom CSS scoped to this menu's wrapper element
menu_div_codetextCustom HTML or PHP code injected into the menu's wrapper
menu_effectsstringJavaScript animation or effect applied to this menu (EG slide, fade); max 60 characters
menu_activeintegerWhether this menu is active and rendered on pages: 1 active, 0 inactive
revision_timestamptimestampTimestamp of the last modification to this record (auto-managed)

List Menus

GET /api/v2/menus/get

Example Request

Copy
curl -X GET "https://www.yourdomain.com/api/v2/menus/get?limit=25" \
  -H "X-Api-Key: your-api-key-here"

Example Response

Copy
{
  "status": "success",
  "message": [
    {
      "menu_id": "62",
      "menu_name": "header_mini_nav",
      "menu_title": "Top Header Menu",
      "menu_location": "",
      "menu_div_id": "",
      "menu_div_class": "",
      "menu_div_css": "",
      "menu_div_code": "",
      "menu_effects": "",
      "menu_active": "1",
      "revision_timestamp": "2020-10-28 19:46:38"
    }
  ],
  "total": "1",
  "current_page": 1,
  "total_pages": 1
}

Retrieve a Menu

GET /api/v2/menus/get/{menu_id}

Example Request

Copy
curl -X GET "https://www.yourdomain.com/api/v2/menus/get/62" \
  -H "X-Api-Key: your-api-key-here"

Example Response

Copy
{
  "status": "success",
  "message": [
    {
      "menu_id": "62",
      "menu_name": "header_mini_nav",
      "menu_title": "Top Header Menu",
      "menu_location": "",
      "menu_div_id": "",
      "menu_div_class": "",
      "menu_div_css": "",
      "menu_div_code": "",
      "menu_effects": "",
      "menu_active": "1",
      "revision_timestamp": "2020-10-28 19:46:38"
    }
  ],
  "total": "1",
  "current_page": 1,
  "total_pages": 1
}

Create a Menu

POST /api/v2/menus/create

Example Request

Copy
curl -X POST "https://www.yourdomain.com/api/v2/menus/create" \
  -H "X-Api-Key: your-api-key-here" \
  -d "menu_name=footer_nav" \
  -d "menu_title=Footer+Navigation" \
  -d "menu_location=footer" \
  -d "menu_active=1"

Example Response

Copy
{
  "status": "success",
  "message": {
    "menu_id": "63",
    "menu_name": "footer_nav",
    "menu_title": "Footer Navigation",
    "menu_location": "footer",
    "menu_div_id": null,
    "menu_div_class": null,
    "menu_div_css": null,
    "menu_div_code": null,
    "menu_effects": null,
    "menu_active": "1",
    "revision_timestamp": null
  }
}

Update a Menu

PUT /api/v2/menus/update

Example Request

Copy
curl -X PUT "https://www.yourdomain.com/api/v2/menus/update" \
  -H "X-Api-Key: your-api-key-here" \
  -d "menu_id=63" \
  -d "menu_title=Site+Footer+Navigation" \
  -d "menu_div_class=footer-nav-wrapper"

Example Response

Copy
{
  "status": "success",
  "message": {
    "menu_id": "63",
    "menu_name": "footer_nav",
    "menu_title": "Site Footer Navigation",
    "menu_location": "footer",
    "menu_div_id": null,
    "menu_div_class": "footer-nav-wrapper",
    "menu_div_css": null,
    "menu_div_code": null,
    "menu_effects": null,
    "menu_active": "1",
    "revision_timestamp": "2026-04-03 10:00:00"
  }
}

Delete a Menu

DELETE /api/v2/menus/delete

Example Request

Copy
curl -X DELETE "https://www.yourdomain.com/api/v2/menus/delete" \
  -H "X-Api-Key: your-api-key-here" \
  -d "menu_id=63"

Example Response

Copy
{
  "status": "success",
  "message": "menus record was deleted"
}