> 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/chat/chat-message-seen-users.md).

# ChatMessageSeenUsers

## Introduction

When a [User](/api-reference/users.md) has seen a [ChatMessage](/api-reference/chat/chat-messages.md), intratool tracks this as a `ChatMessageSeenUser`.

## Model Definition

**Relations**

| Key           | Relation                                            | Type       | Relation Field(s) |
| ------------- | --------------------------------------------------- | ---------- | ----------------- |
| `user`        | [User](/api-reference/users.md)                     | Belongs to | `user_id`         |
| `chatMessage` | [ChatMessage](/api-reference/chat/chat-messages.md) | Belongs to | `chat_message_id` |

## List by message

List visible `ChatMessageSeenUsers` for a [ChatMessage](/api-reference/chat/chat-messages.md).

**Definition**

<mark style="color:green;">`GET`</mark> `/api/chat/messages/{chatMessage}/seen-users`

**Route Parameters**

| Parameter     | Type                  | Description             |
| ------------- | --------------------- | ----------------------- |
| `chatMessage` | `integer` \| `string` | ChatMessage ID or hash. |

**Example Request**

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

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

{% endtab %}
{% endtabs %}

**Example Response**

```json
[
  {
    "id": 1,
    "user_id": 3,
    "chat_message_id": 1,
    "created_at": "2026-08-06 09:36:00"
  },
  {
    "id": 2,
    "user_id": 4,
    "chat_message_id": 1,
    "created_at": "2026-08-06 09:37:00"
  }
]
```

## Create by conversation

Create `ChatMessageSeenUsers` for all unseen messages in a [ChatConversation](/api-reference/chat/chat-conversations.md).

**Definition**

<mark style="color:yellow;">`POST`</mark> `/api/chat/conversations/{chatConversation}/messages/seen-users`

**Route Parameters**

| Parameter          | Type                  | Description                  |
| ------------------ | --------------------- | ---------------------------- |
| `chatConversation` | `integer` \| `string` | ChatConversation ID or hash. |

**Behavior**

The authenticated user is used automatically. Existing records are not duplicated, and notifications for the affected messages are marked as read.

**Example Request**

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

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

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "status": "success",
  "data": [
    {
      "id": 1,
      "user_id": 3,
      "chat_message_id": 1,
      "created_at": "2026-08-06 09:36:00"
    }
  ]
}
```

## Create by message

Create a `ChatMessageSeenUser` for the current authenticated [User](/api-reference/users.md) and a [ChatMessage](/api-reference/chat/chat-messages.md).

**Definition**

<mark style="color:yellow;">`POST`</mark> `/api/chat/messages/{chatMessage}/seen-users`

**Route Parameters**

| Parameter     | Type                  | Description             |
| ------------- | --------------------- | ----------------------- |
| `chatMessage` | `integer` \| `string` | ChatMessage ID or hash. |

**Behavior**

The operation is idempotent and marks notifications for the message as read.

**Example Request**

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

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

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "status": "success",
  "data": {
    "id": 1,
    "user_id": 3,
    "chat_message_id": 1,
    "created_at": "2026-08-06 09:36:00"
  }
}
```
