> 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-post-seen-users.md).

# InfoboardPostSeenUsers

When a [User](/api-reference/users.md) has seen the content of a [InfoboardPost](https://github.com/intratool/intratool-api-docs/blob/gitbook-en/api-reference/infoboard/infoboard-post.md), intratool will track this as a `InfoboardPostSeenUser`.

## Model Definition

**Relations**

| Key    | Relation                                                     | Type       | Relation Field(s) |
| ------ | ------------------------------------------------------------ | ---------- | ----------------- |
| `user` | [User](/api-reference/users.md)                              | Belongs to | `user_id`         |
| `post` | [InfoboardPost](/api-reference/infoboard/infoboard-posts.md) | Belongs to | `post_id`         |

## List

Get a list of `InfoboardPostSeenUsers` by [InfoboardPost](/api-reference/infoboard/infoboard-posts.md).

**Definition**

<mark style="color:green;">`GET`</mark> `/api/infoboard/posts/{postId}/seen-users`

**Example Request**

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

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

{% endtab %}
{% endtabs %}

**Example Response**

```json
[
  {
    "id": 1,
    "user_id": 4,
    "post_id": 1,
    "created_at": "2018-11-20 16:23:45"
  },
  {
    "id": 2,
    "user_id": 5,
    "post_id": 1,
    "created_at": "2018-12-05 16:31:29"
  }
]
```

## Create

Create a new `InfoboardPostSeenUser` by [InfoboardPost](/api-reference/infoboard/infoboard-posts.md).

**Definition**

<mark style="color:yellow;">`POST`</mark> `/api/infoboard/posts/{postId}/seen-users`

**Request Keys**

| Key           | Type    | Default | Description                                                               |
| ------------- | ------- | ------- | ------------------------------------------------------------------------- |
| `post_id`\*\* | integer | -       | The related [InfoboardPost](/api-reference/infoboard/infoboard-posts.md). |

Keys with `*` are required.\
Keys with `**` are normalized to the information given by the route.

**Example Request**

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

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

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "status": "success",
  "data": {
    "id": 3,
    "user_id": 6,
    "post_id": 1,
    "created_at": "2018-11-20 16:35:25"
  }
}
```
