> 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/reactions.md).

# Reactions

## Introduction

`Reactions` let a [User](/api-reference/users.md) attach one emoji value to a resource with the [Reactions capability](/introduction/resource-capabilities/reactions.md). Posting again for the same user and resource updates that record.

## Model Definition

**Reactable Types**

* `chatMessage` - Attaches the Reaction to a [ChatMessage](/api-reference/chat/chat-messages.md).
* `infoboardComment` - Attaches the Reaction to an [InfoboardComment](/api-reference/infoboard/infoboard-comments.md).
* `infoboardPost` - Attaches the Reaction to an [InfoboardPost](/api-reference/infoboard/infoboard-posts.md).
* `manualEntry` - Attaches the Reaction to a [ManualEntry](/api-reference/manual/manual-entries.md).

**Capabilities**

* [Notifications](/introduction/resource-capabilities/notifications.md) - Creating or changing a reaction can trigger notifications according to the target resource and notification settings.

**Relations**

| Key         | Relation                        | Type       | Relation Field(s)                |
| ----------- | ------------------------------- | ---------- | -------------------------------- |
| `user`      | [User](/api-reference/users.md) | Belongs to | `user_id`                        |
| `reactable` | Reactable resource              | Morph to   | `reactable_type`, `reactable_id` |

Reactable resources can return `reactions_summary` as an append. It contains emoji/count pairs sorted by descending count.

## List by Reactable

List `Reactions` for one reactable entity.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/reactions/{reactableType}/{reactableId}`

**Route Parameters**

| Parameter       | Type      | Description                                                       |
| --------------- | --------- | ----------------------------------------------------------------- |
| `reactableType` | `string`  | Selects one of the supported [Reactable Types](#reactable-types). |
| `reactableId`   | `integer` | Existing reactable ID.                                            |

**Request Keys**

| Key         | Type     | Default           | Description                          |
| ----------- | -------- | ----------------- | ------------------------------------ |
| `selects`   | `string` | All fields        | Comma-separated fields to return.    |
| `relations` | `string` | Default relations | Pipe-separated relations to include. |

**Example Request**

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

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

{% endtab %}
{% endtabs %}

**Example Response**

```json
[
  {
    "id": 61,
    "user_id": 7,
    "reactable_id": 850,
    "reactable_type": "infoboardPost",
    "value": "👍",
    "created_at": "2026-08-06 09:00:00",
    "updated_at": "2026-08-06 09:00:00",
    "deleted_at": null
  },
  {
    "id": 62,
    "user_id": 19,
    "reactable_id": 850,
    "reactable_type": "infoboardPost",
    "value": "🎉",
    "created_at": "2026-08-06 09:05:00",
    "updated_at": "2026-08-06 09:10:00",
    "deleted_at": null
  }
]
```

## Summary by Reactable

Summarize `Reactions` for one reactable entity.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/reactions/{reactableType}/{reactableId}/summary`

**Route Parameters**

| Parameter       | Type      | Description                                                       |
| --------------- | --------- | ----------------------------------------------------------------- |
| `reactableType` | `string`  | Selects one of the supported [Reactable Types](#reactable-types). |
| `reactableId`   | `integer` | Existing reactable ID.                                            |

**Example Request**

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

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

{% endtab %}
{% endtabs %}

**Example Response**

```json
[
  {
    "reaction": "👍",
    "count": 3
  },
  {
    "reaction": "🎉",
    "count": 1
  }
]
```

## Show

Show one `Reaction`.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/reactions/{reaction}`

**Route Parameters**

| Parameter  | Type      | Description  |
| ---------- | --------- | ------------ |
| `reaction` | `integer` | Reaction ID. |

**Request Keys**

| Key         | Type     | Default           | Description                          |
| ----------- | -------- | ----------------- | ------------------------------------ |
| `selects`   | `string` | All fields        | Comma-separated fields to return.    |
| `relations` | `string` | Default relations | Pipe-separated relations to include. |

**Example Request**

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

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

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "id": 61,
  "user_id": 7,
  "reactable_id": 850,
  "reactable_type": "infoboardPost",
  "value": "👍",
  "created_at": "2026-08-06 09:00:00",
  "updated_at": "2026-08-06 09:00:00",
  "deleted_at": null
}
```

## Create or Update

Create or update the current user's `Reaction` for one reactable entity.

**Definition**

<mark style="color:yellow;">`POST`</mark> `/api/reactions`

**Request Keys**

| Key                | Type      | Default | Description                                                       |
| ------------------ | --------- | ------- | ----------------------------------------------------------------- |
| `reactable_type`\* | `string`  | -       | Selects one of the supported [Reactable Types](#reactable-types). |
| `reactable_id`\*   | `integer` | -       | Existing reactable ID.                                            |
| `value`\*          | `string`  | -       | Emoji value, at most 10 characters.                               |

Keys with `*` are required.

**Behavior**

`user_id` is always taken from the authenticated user. The complete request combination determines whether the response is a newly created reaction or the updated existing reaction.

**Example Request**

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

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/reactions', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'reactable_type' => 'infoboardPost',
        'reactable_id' => 850,
        'value' => '🎉'
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "status": "success",
  "data": {
    "id": 63,
    "user_id": 7,
    "reactable_id": 850,
    "reactable_type": "infoboardPost",
    "value": "🎉",
    "created_at": "2026-08-06 10:00:00",
    "updated_at": "2026-08-06 10:00:00",
    "deleted_at": null
  }
}
```

## Delete

Delete an existing `Reaction`.

**Definition**

<mark style="color:red;">`DELETE`</mark> `/api/reactions/{reaction}`

**Route Parameters**

| Parameter  | Type      | Description  |
| ---------- | --------- | ------------ |
| `reaction` | `integer` | Reaction ID. |

**Example Request**

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

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

{% endtab %}
{% endtabs %}

**Example Response**

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