> 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/infoboard/infoboard-department-settings.md).

# InfoboardDepartmentSettings

## Introduction

`InfoboardDepartmentSettings` store one settings object per [Department](/api-reference/departments.md). The current public setting selects an optional default [InfoboardChannel](/api-reference/infoboard/infoboard-channels.md).

Administration endpoints can upsert settings for one department or apply the same settings to several departments.

## Model Definition

**Alias**

`infoboardDepartmentSettings`

**Relations**

| Key          | Relation                                    | Type       | Relation Field(s) |
| ------------ | ------------------------------------------- | ---------- | ----------------- |
| `user`       | [User](/api-reference/users.md)             | Belongs to | `user_id`         |
| `department` | [Department](/api-reference/departments.md) | Belongs to | `department_id`   |

## Show Current

Show the `InfoboardDepartmentSettings` for the authenticated user's primary department.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/infoboard/department-settings/current`

**Behavior**

* The response is `null` when the department has no settings record.

**Example Request**

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

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

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "id": 1,
  "user_id": 3,
  "department_id": 1,
  "settings": {
    "default_channel_id": 1
  },
  "created_at": "2026-08-06 09:00:00",
  "updated_at": "2026-08-06 09:00:00",
  "deleted_at": null
}
```

## Admin: List

List all `InfoboardDepartmentSettings` in administration scope.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/administration/infoboard/department-settings`

**Example Request**

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

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

{% endtab %}
{% endtabs %}

**Example Response**

```json
[
  {
    "id": 1,
    "user_id": 3,
    "department_id": 1,
    "settings": {
      "default_channel_id": 1
    },
    "created_at": "2026-08-06 09:00:00",
    "updated_at": "2026-08-06 09:00:00",
    "deleted_at": null
  },
  {
    "id": 2,
    "user_id": 3,
    "department_id": 2,
    "settings": {
      "default_channel_id": 2
    },
    "created_at": "2026-08-06 09:05:00",
    "updated_at": "2026-08-06 09:05:00",
    "deleted_at": null
  }
]
```

## Admin: Show by Department

Show `InfoboardDepartmentSettings` for one department.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/administration/infoboard/department-settings/{department}`

**Route Parameters**

| Parameter    | Type      | Description    |
| ------------ | --------- | -------------- |
| `department` | `integer` | Department 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/department-settings/1', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "id": 1,
  "user_id": 3,
  "department_id": 1,
  "settings": {
    "default_channel_id": 1
  },
  "created_at": "2026-08-06 09:00:00",
  "updated_at": "2026-08-06 09:00:00",
  "deleted_at": null
}
```

## Admin: Create or Update by Department

Create or update `InfoboardDepartmentSettings` for one department.

**Definition**

<mark style="color:yellow;">`POST`</mark> `/api/administration/infoboard/department-settings/{department}`

**Route Parameters**

| Parameter    | Type      | Description    |
| ------------ | --------- | -------------- |
| `department` | `integer` | Department ID. |

**Request Keys**

| Key                           | Type                | Default | Description                                                                           |
| ----------------------------- | ------------------- | ------- | ------------------------------------------------------------------------------------- |
| `settings`\*                  | `object`            | -       | Complete Infoboard settings object for the department.                                |
| `settings.default_channel_id` | `integer` \| `null` | `null`  | ID of the default [InfoboardChannel](/api-reference/infoboard/infoboard-channels.md). |

Keys with `*` are required.

**Behavior**

* `department_id` is derived from the route and `user_id` from the authenticated user; client-provided values are replaced.
* An existing record for the department is updated instead of duplicated.

**Example Request**

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

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

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "status": "success",
  "data": {
    "id": 1,
    "user_id": 3,
    "department_id": 1,
    "settings": {
      "default_channel_id": 1
    },
    "created_at": "2026-08-06 09:00:00",
    "updated_at": "2026-08-06 10:00:00",
    "deleted_at": null
  }
}
```

## Admin: Create or Update Multiple Departments

Apply one settings object to several departments.

**Definition**

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

**Request Keys**

| Key                           | Type                | Default | Description                                                                           |
| ----------------------------- | ------------------- | ------- | ------------------------------------------------------------------------------------- |
| `department_ids`\*            | `array`             | -       | IDs of departments that receive the settings.                                         |
| `settings`\*                  | `object`            | -       | Complete Infoboard settings object applied to every department.                       |
| `settings.default_channel_id` | `integer` \| `null` | `null`  | ID of the default [InfoboardChannel](/api-reference/infoboard/infoboard-channels.md). |

Keys with `*` are required.

**Behavior**

* New records use the authenticated user as `user_id`.
* Existing records are matched by `department_id`; their `settings` and timestamps are updated while their existing `user_id` remains unchanged.
* The response is the raw list of affected settings records rather than a success wrapper.

**Example Request**

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

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

{% endtab %}
{% endtabs %}

**Example Response**

```json
[
  {
    "id": 1,
    "user_id": 3,
    "department_id": 1,
    "settings": {
      "default_channel_id": 2
    },
    "created_at": "2026-08-06 09:00:00",
    "updated_at": "2026-08-06 10:15:00",
    "deleted_at": null
  },
  {
    "id": 2,
    "user_id": 3,
    "department_id": 2,
    "settings": {
      "default_channel_id": 2
    },
    "created_at": "2026-08-06 09:05:00",
    "updated_at": "2026-08-06 10:15:00",
    "deleted_at": null
  }
]
```

## Admin: Delete by Department

Delete `InfoboardDepartmentSettings` for one department.

**Definition**

<mark style="color:red;">`DELETE`</mark> `/api/administration/infoboard/department-settings/{department}`

**Route Parameters**

| Parameter    | Type      | Description    |
| ------------ | --------- | -------------- |
| `department` | `integer` | Department ID. |

**Behavior**

* The settings record is soft-deleted when it exists.
* Deleting settings for an existing department without a settings record is idempotent and still returns success.

**Example Request**

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

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

{% endtab %}
{% endtabs %}

**Example Response**

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