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: menusThe Menu Object
| Field | Type | Description |
|---|---|---|
menu_id | integer | Unique menu ID (primary key, read-only) |
menu_name | string | Internal machine-readable name for this menu (EG header_mini_nav); max 35 characters required on create |
menu_title | string | Human-readable display title for this menu (EG Top Header Menu) required on create |
menu_location | string | Theme location or hook where this menu is rendered (EG header, footer) |
menu_div_id | string | HTML id attribute applied to the menu's wrapper element; max 60 characters |
menu_div_class | string | HTML class attribute applied to the menu's wrapper element; max 60 characters |
menu_div_css | text | Custom CSS scoped to this menu's wrapper element |
menu_div_code | text | Custom HTML or PHP code injected into the menu's wrapper |
menu_effects | string | JavaScript animation or effect applied to this menu (EG slide, fade); max 60 characters |
menu_active | integer | Whether this menu is active and rendered on pages: 1 active, 0 inactive |
revision_timestamp | timestamp | Timestamp 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"
}