# InfoboardChannels

`InfoboardChannels` function as subspaces within the Infoboard. Access to each `InfoboardChannel` is controlled through [EntityPermissions](/api-reference/entity-permissions.md), which define the [Departments](/api-reference/departments.md) that are members of the channel.

An [InfoboardPost](/api-reference/infoboard/infoboard-posts.md) can be assigned an `infoboard_channel_id`, making it visible only to the [Departments](/api-reference/departments.md) granted access via [EntityPermissions](/api-reference/entity-permissions.md). Additionally, [InfoboardPosts](/api-reference/infoboard/infoboard-posts.md) in channels can further restrict access to individual [Departments](/api-reference/departments.md) within the channel via the `departments` relation.

It is also possible to assign permissions such as `write`, `comment` and `administrate` for the individual [Roles](/api-reference/roles.md) of the assigned [Departments](/api-reference/departments.md) via [EntityPermissions](/api-reference/entity-permissions.md).

## Model Definition

### Alias

`infoboardChannel`

### Relations

| Key                 | Relation                                                     | Type       | Relation Field(s)                     |
| ------------------- | ------------------------------------------------------------ | ---------- | ------------------------------------- |
| `user`              | [User](/api-reference/users.md)                              | Belongs to | `user_id`                             |
| `folder`            | [Folder](/api-reference/folders.md)                          | Belongs to | `folder_id`                           |
| `icon`              | [Icon](/api-reference/icons.md)                              | Belongs to | `icon_id`                             |
| `entityPermissions` | [EntityPermissions](/api-reference/entity-permissions.md)    | Morph many |                                       |
| `infoboardPosts`    | [InfoboardPost](/api-reference/infoboard/infoboard-posts.md) | Has many   | `infoboard_post.infoboard_channel_id` |

## List

Get a list of all `InfoboardChannels` the current authenticated [User](/api-reference/users.md) is allowed to view.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/infoboard/channels`

**Example Request**

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

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

{% endtab %}
{% endtabs %}

**Example Response Body**

```json
[
  {
    "id": 1,
    "user_id": 1,
    "folder_id": null,
    "icon_id": 10,
    "title": "Non curabitur gravida arcu ac",
    "color": "#ffffff",
    "sort_number": 1,
    "created_at": "2025-03-17 12:00:00",
    "updated_at": "2025-03-17 12:00:00",
    "deleted_at": null
  },
  {
    "id": 2,
    "user_id": 1,
    "folder_id": null,
    "icon_id": 20,
    "title": "Placerat duis ultricies lacus sed",
    "color": "#000000",
    "sort_number": 2,
    "created_at": "2025-03-17 13:00:00",
    "updated_at": "2025-03-17 13:00:00",
    "deleted_at": null
  }
]
```

## Show

Show a single `InfoboardChannel` by `id`.

**Definition**

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

**Example Request**

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

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

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "id": 1,
  "user_id": 1,
  "folder_id": null,
  "icon_id": 10,
  "title": "Non curabitur gravida arcu ac",
  "color": "#ffffff",
  "sort_number": 1,
  "created_at": "2025-03-17 12:00:00",
  "updated_at": "2025-03-17 12:00:00",
  "deleted_at": null
}
```

## \[Adm.] List

Get a list of all `InfoboardChannels`.

**Definition**

<mark style="color:green;">`GET`</mark> /api/administration/infoboard/channels\`

**Example Request**

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

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

**Example Response Body**

```json
[
  {
    "id": 1,
    "user_id": 1,
    "folder_id": null,
    "icon_id": 10,
    "title": "Non curabitur gravida arcu ac",
    "color": "#ffffff",
    "sort_number": 1,
    "created_at": "2025-03-17 12:00:00",
    "updated_at": "2025-03-17 12:00:00",
    "deleted_at": null
  },
  {
    "id": 2,
    "user_id": 1,
    "folder_id": null,
    "icon_id": 20,
    "title": "Placerat duis ultricies lacus sed",
    "color": "#000000",
    "sort_number": 2,
    "created_at": "2025-03-17 13:00:00",
    "updated_at": "2025-03-17 13:00:00",
    "deleted_at": null
  }
]
```

## \[Adm.] Show

Get a single `InfoboardChannel` by `id`.

**Definition**

<mark style="color:green;">`GET`</mark> /api/administration/infoboard/channels/{id}\`

**Example Request**

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

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

**Example Response Body**

```json
{
  "id": 1,
  "user_id": 1,
  "folder_id": null,
  "icon_id": 10,
  "title": "Non curabitur gravida arcu ac",
  "color": "#ffffff",
  "sort_number": 1,
  "created_at": "2025-03-17 12:00:00",
  "updated_at": "2025-03-17 12:00:00",
  "deleted_at": null
}
```

## \[Adm.] Create

Create a new `InfoboardChannel`.

**Definition**

<mark style="color:yellow;">`POST`</mark> `/api/administration/infoboard/channels`

**Request Keys**

| Key           | Type    | Default            | Description                                                                             |
| ------------- | ------- | ------------------ | --------------------------------------------------------------------------------------- |
| `folder_id`   | integer | -                  | The ID of [Folder](/api-reference/folders.md) the `InfoboardChannel` is assigned to.    |
| `icon_id`     | integer | -                  | The ID of the [Icon](/api-reference/icons.md) or the `InfoboardChannel`                 |
| `title`\*     | string  | -                  | The title of the `InfoboardChannel`.                                                    |
| `color`       | string  | -                  | The color as a HEX string.                                                              |
| `sort_number` | integer | Current highest +1 | The index of the `InfoboardChannel` related to the [Folder](/api-reference/folders.md). |

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/infoboard/channels', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'icon_id' => 30,
        'title' => 'Sagittis purus sit amet volutpat',
        'color' => '#cccccc'
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response Body**

```json
{
  "status": "success",
  "data": {
    "id": 3,
    "user_id": 1,
    "folder_id": null,
    "icon_id": 30,
    "title": "Sagittis purus sit amet volutpat",
    "color": "#cccccc",
    "sort_number": 3,
    "created_at": "2025-03-17 14:00:00",
    "updated_at": "2025-03-17 14:00:00",
    "deleted_at": null
  }
}
```

## \[Adm.] Update

Update an existing `InfoboardChannel` by `id`.

**Definition**

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

**Request Keys**

| Key           | Type    | Description                                                                             |
| ------------- | ------- | --------------------------------------------------------------------------------------- |
| `folder_id`   | integer | The ID of [Folder](/api-reference/folders.md) the `InfoboardChannel` is assigned to.    |
| `icon_id`     | integer | The ID of the [Icon](/api-reference/icons.md) or the `InfoboardChannel`                 |
| `title`       | string  | The title of the `InfoboardChannel`.                                                    |
| `color`       | string  | The color as a HEX string.                                                              |
| `sort_number` | integer | The index of the `InfoboardChannel` related to the [Folder](/api-reference/folders.md). |

**Example Request**

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

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('PUT', '/api/administration/infoboard/channels/3', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'icon_id' => 40,
        'color' => '#dddddd'
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response Body**

```json
{
  "status": "success",
  "data": {
    "id": 3,
    "user_id": 1,
    "folder_id": null,
    "icon_id": 40,
    "title": "Sagittis purus sit amet volutpat",
    "color": "#dddddd",
    "sort_number": 3,
    "created_at": "2025-03-17 14:00:00",
    "updated_at": "2025-03-17 15:00:00",
    "deleted_at": null
  }
}
```

## \[Adm.] Delete

Delete an existing `InfoboardChannel` by `id`.

**Definition**

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

**Example Request**

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

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

{% endtab %}
{% endtabs %}

**Example Response Body**

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


---

# Agent Instructions: 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:

```
GET https://docs.api.intratool.de/api-reference/infoboard/infoboard-channels.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
