> For the complete documentation index, see [llms.txt](https://docs.api.intratool.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.api.intratool.de/api-reference/menu/menu-items.md).

# MenuItems

## Introduction

`MenuItems` are configurable additional menu entries.

The module provides user and administration endpoints.

## User routes

## List

Get all visible `MenuItems` for the current authenticated user.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/menu/items`

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/menu/items', [
    'headers' => ['Authorization' => 'Bearer {accessToken}'],
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
[
  {
    "id": 15,
    "lang_id": "de",
    "icon_id": 4,
    "menu_identifier": "help-center",
    "type": "default",
    "title": "Help Center",
    "link": "https://example.com/help",
    "allow_iframe_access": true,
    "iframe_access": false,
    "user_confirmation_required": false,
    "sort_number": 1,
    "created_at": "2019-06-15 12:00:00",
    "updated_at": "2019-06-15 12:00:00",
    "deleted_at": null
  }
]
```

## Show

Show a single `MenuItem` by `id`.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/menu/items/{id}`

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/menu/items/15', [
    'headers' => ['Authorization' => 'Bearer {accessToken}'],
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "id": 15,
  "lang_id": "de",
  "icon_id": 4,
  "menu_identifier": "help-center",
  "type": "default",
  "title": "Help Center",
  "link": "https://example.com/help",
  "allow_iframe_access": true,
  "iframe_access": false,
  "user_confirmation_required": false,
  "sort_number": 1,
  "created_at": "2019-06-15 12:00:00",
  "updated_at": "2019-06-15 12:00:00",
  "deleted_at": null
}
```

## \[Adm.] List

Get all `MenuItems` in administration scope.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/administration/menu/items`

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/administration/menu/items', [
    'headers' => ['Authorization' => 'Bearer {accessToken}'],
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
[
  {
    "id": 15,
    "lang_id": "de",
    "icon_id": 4,
    "menu_identifier": "help-center",
    "type": "default",
    "title": "Help Center",
    "link": "https://example.com/help",
    "allow_iframe_access": true,
    "iframe_access": false,
    "user_confirmation_required": false,
    "sort_number": 1,
    "created_at": "2019-06-15 12:00:00",
    "updated_at": "2019-06-15 12:00:00",
    "deleted_at": null
  }
]
```

## \[Adm.] Show

Show a single `MenuItem` by `id` in administration scope.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/administration/menu/items/{id}`

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/administration/menu/items/15', [
    'headers' => ['Authorization' => 'Bearer {accessToken}'],
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "id": 15,
  "lang_id": "de",
  "icon_id": 4,
  "menu_identifier": "help-center",
  "type": "default",
  "title": "Help Center",
  "link": "https://example.com/help",
  "allow_iframe_access": true,
  "iframe_access": false,
  "user_confirmation_required": false,
  "sort_number": 1,
  "created_at": "2019-06-15 12:00:00",
  "updated_at": "2019-06-15 12:00:00",
  "deleted_at": null
}
```

## \[Adm.] Create

Create a new `MenuItem`.

**Definition**

<mark style="color:yellow;">`POST`</mark> `/api/administration/menu/items`

**Request Keys**

| Key                          | Type    | Default            | Description                                                  |
| ---------------------------- | ------- | ------------------ | ------------------------------------------------------------ |
| `lang_id`                    | string  | system language    | Language key for translatable fields.                        |
| `icon_id`\*                  | integer | -                  | Related [Icon](/api-reference/icons.md).                     |
| `menu_identifier`\*          | string  | -                  | Internal identifier of the menu section.                     |
| `type`\*                     | string  | -                  | Item type.                                                   |
| `title`\*                    | string  | -                  | Display title.                                               |
| `link`\*                     | string  | -                  | Target URL/link.                                             |
| `allow_iframe_access`        | boolean | `true`             | Enables iframe-access probing for the link.                  |
| `iframe_access`              | boolean | calculated         | Computed by backend from `allow_iframe_access` + link check. |
| `user_confirmation_required` | boolean | `false`            | Whether user confirmation is required.                       |
| `sort_number`                | integer | current highest +1 | Sort order in menu section.                                  |
| `entity_permissions`         | array   | -                  | Optional entity-permission restrictions.                     |

Keys with `*` are required.

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/administration/menu/items', [
    'headers' => ['Authorization' => 'Bearer {accessToken}'],
    'json' => [
        'icon_id' => 4,
        'menu_identifier' => 'help-center',
        'type' => 'default',
        'title' => 'Help Center',
        'link' => 'https://example.com/help',
        'allow_iframe_access' => false,
        'user_confirmation_required' => false
    ],
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "status": "success",
  "data": {
    "id": 15,
    "lang_id": "de",
    "icon_id": 4,
    "menu_identifier": "help-center",
    "type": "default",
    "title": "Help Center",
    "link": "https://example.com/help",
    "allow_iframe_access": false,
    "iframe_access": false,
    "user_confirmation_required": false,
    "sort_number": 1,
    "created_at": "2019-06-15 12:00:00",
    "updated_at": "2019-06-15 12:00:00",
    "deleted_at": null
  }
}
```

### System variables in `link`

`link` supports system variables.

Common examples:

* `{{ system.user.id }}`
* `{{ menuItem.id }}`

Example:

```
https://example.com/menu-items/{{ menuItem.id }}/users/{{ system.user.id }}
```

Notes:

* In create/update responses, `link` is stored and returned as configured.
* Resolved values are exposed by [NavigationItems](/api-reference/menu/navigation-items.md).
* For iframe-enabled links, URL validation is done with system-variable placeholders.

## \[Adm.] Update

Update an existing `MenuItem` by `id`.

**Definition**

<mark style="color:blue;">`PUT`</mark> `/api/administration/menu/items/{id}`

**Request Keys**

Same keys as create, all optional (`filled`) except backend-calculated behavior for `iframe_access`.

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('PUT', '/api/administration/menu/items/15', [
    'headers' => ['Authorization' => 'Bearer {accessToken}'],
    'json' => [
        'title' => 'Help Center (Updated)',
        'link' => 'https://example.com/menu-items/{{ menuItem.id }}/users/{{ system.user.id }}',
        'allow_iframe_access' => false
    ],
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "status": "success",
  "data": {
    "id": 15,
    "lang_id": "de",
    "icon_id": 4,
    "menu_identifier": "help-center",
    "type": "default",
    "title": "Help Center (Updated)",
    "link": "https://example.com/menu-items/{{ menuItem.id }}/users/{{ system.user.id }}",
    "allow_iframe_access": false,
    "iframe_access": false,
    "user_confirmation_required": false,
    "sort_number": 1,
    "created_at": "2019-06-15 12:00:00",
    "updated_at": "2019-06-15 12:30:00",
    "deleted_at": null
  }
}
```

## \[Adm.] Delete

Delete an existing `MenuItem` by `id`.

**Definition**

<mark style="color:red;">`DELETE`</mark> `/api/administration/menu/items/{id}`

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('DELETE', '/api/administration/menu/items/15', [
    'headers' => ['Authorization' => 'Bearer {accessToken}'],
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "status": "success",
  "data": null
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.api.intratool.de/api-reference/menu/menu-items.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
