About this plugin
EndPointy Menus adds custom REST API routes to expose your WordPress navigation menus as JSON.
Base namespace: endpointy-menus/v1
Endpoints:
-
GET /wp-json/endpointy-menus/v1/menus
Returns all registered menus with locations and items.
-
GET /wp-json/endpointy-menus/v1/menus/<id>
Returns a single menu and its items by menu ID.
-
GET /wp-json/endpointy-menus/v1/menus/slug/<slug>
Returns a single menu and its items by menu slug.
-
GET /wp-json/endpointy-menus/v1/locations
Returns all registered menu locations with assigned menus.
-
GET /wp-json/endpointy-menus/v1/locations/<location>
, ‘primary’, ‘footer’).
Query Parameters:
-
nested=true – Returns menu items in a hierarchical tree structure with parent-child relationships.
nested=true
-
meta=true – Adds extra item data: description, attr_title, current flag, featured image URL and post excerpt.
meta=true
-
fields=id,title,url – Returns only the listed fields per item (children are always kept in nested mode).
fields=id,title,url
- depth=2 – In nested mode, limits how many levels deep the tree goes (0 or omitted = unlimited). Handy when your front end only renders the top couple of levels.
nested=true&depth=2
nested=true&meta=true&fields=id,title,url,children&depth=2.
Every menu in the response also lists the theme locations it is assigned to.
Settings (Settings → EndPointy Menus):
- Response caching with a configurable lifetime (transients, auto-flushed when a menu is edited).
- Optional API-key protection via X-API-Key header or api_key query parameter.
- CORS allow-list for browser-based consumers.
- Per-IP rate limiting (requests/minute) with X-RateLimit headers and 429 responses.
- ETag / Last-Modified conditional requests returning 304 Not Modified.
Developer hooks:
- endpointy_menus_item filter – modify each formatted menu item before output.
This is useful for headless WordPress setups or any external app that needs to read your menu structure.
Usage
Example requests:
Get all menus:
com/wp-json/endpointy-menus/v1/menus
Get single menu by ID:
com/wp-json/endpointy-menus/v1/menus/2
Get all menu locations:
com/wp-json/endpointy-menus/v1/locations
, ‘primary’):
com/wp-json/endpointy-menus/v1/locations/primary
Get nested menu structure:
nested=true
nested=true
Use these URLs directly from your front-end application or API client.
Support the Developer
If you find this plugin useful, you can support the developer:
- Website: https://gunjanjaswal.me
- GitHub: https://github.com/gunjanjaswal/Endpointy-Menus
- Ko-fi: https://ko-fi.com/gunjanjaswal
Contributing
Contributions, issues, and feature requests are welcome!
com/gunjanjaswal/Endpointy-Menus
com/gunjanjaswal/Endpointy-Menus/issues