Anythink lets you create custom navigation menus for your application. Define menu items with labels, icons, links, and nested sub-items — then serve them via API to drive navigation in your frontend.
Menus in Anythink are a flexible way to manage your application's navigation structure from the dashboard, without hardcoding links into your frontend code. Your frontend fetches the menu via API and renders it — change a menu item in the dashboard and the change appears in your app immediately, no redeployment needed.
This is useful for:
main-nav, sidebar)Create a menu:
POST /org/{orgId}/menus
{
"name": "main-nav"
}
Each menu item has:
| Field | Type | Description |
|---|---|---|
displayName |
string | The label shown in the UI |
href |
string | The link destination |
icon |
string | Icon name or identifier |
sortOrder |
integer | Position in the list |
parentId |
integer | ID of parent item (for nested menus) |
POST /org/{orgId}/menus/{menuId}/items
{
"displayName": "Products",
"href": "/products",
"icon": "package",
"sortOrder": 1
}
Nested item — add a parentId to nest under another item:
{
"displayName": "Featured Products",
"href": "/products/featured",
"icon": "star",
"sortOrder": 1,
"parentId": 5
}
Get the current user's menu (respects role-based menu assignment):
GET /org/{orgId}/menus/my
Get all menus:
GET /org/{orgId}/menus
Get a specific menu with all its items:
GET /org/{orgId}/menus/{menuId}
The response includes the full menu structure with nested items:
{
"id": 1,
"name": "main-nav",
"items": [
{
"id": 10,
"displayName": "Products",
"href": "/products",
"icon": "package",
"sortOrder": 1,
"items": [
{
"id": 11,
"displayName": "Featured",
"href": "/products/featured",
"sortOrder": 1
}
]
}
]
}
Update a menu item:
PUT /org/{orgId}/menus/{menuId}/items/{itemId}
Reorder items — pass a list of IDs in the desired order:
PUT /org/{orgId}/menus/{menuId}/items/reorder
[
{ "id": 12, "sortOrder": 1 },
{ "id": 10, "sortOrder": 2 },
{ "id": 11, "sortOrder": 3 }
]
Delete a menu item:
DELETE /org/{orgId}/menus/{menuId}/items/{itemId}
Delete an entire menu:
DELETE /org/{orgId}/menus/{menuId}
Fetch the menu on page load and render it dynamically:
const orgId = 'YOUR_ORG_ID';
const token = 'USER_JWT';
const res = await fetch(
`https://api.my.anythink.cloud/org/${orgId}/menus/my`,
{ headers: { 'Authorization': `Bearer ${token}` } }
);
const menu = await res.json();
// menu.items is a nested array — render recursively
function renderMenu(items) {
return items.map(item => ({
label: item.displayName,
href: item.href,
icon: item.icon,
children: renderMenu(item.items || [])
}));
}