---
title: Add a reaction
url: https://www.tines.com/docs/api/cases/comments/reactions/create-1-0/
updated: 2024-04-23T08:14:33+00:00
description: Add a reaction to a comment.
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/llms.txt) › [Tines API](https://www.tines.com/llms.txt) › [Cases](https://www.tines.com/llm/docs/api/cases.md) › [Comments](https://www.tines.com/llm/docs/api/cases/comments.md) › [Reactions](https://www.tines.com/llm/docs/api/cases/comments/reactions.md)*

# Add a reaction

*[View on tines.com](https://www.tines.com/docs/api/cases/comments/reactions/create-1-0/)*

| ⚠️ Note                                                                     |
| --------------------------------------------------------------------------- |
| This API endpoint has been deprecated, please update to the latest version. |

## Description

Add a reaction to a comment.

## Request

HTTP Method: **POST**

| Parameter | Description                                                                                                                        |
| --------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| value     | The value of the reaction to be added to the comment (supported reaction values: `+1`, `-1`, `eyes`, `heart`, `white_check_mark`). |

| Path Parameter | Description       |
| -------------- | ----------------- |
| case_id        | ID of the case    |
| comment_id     | ID of the comment |

### Sample request

```bash
curl -X POST \
  https://<tenant-domain>/api/v1/cases/<<case_id>>/comments/<<comment_id>>/add_reaction \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>' \
  -d '{
        "value": "heart"
      }'
```

## Response

A successful request will return a JSON object describing the updated comment with the reaction added for the authenticated user.

### Field description

| Parameter | Description                                                                              |
| --------- | ---------------------------------------------------------------------------------------- |
| case_id   | The case ID.                                                                             |
| id        | The ID of the record with the comment attached to the case.                              |
| action    | The action taken on the case - `commented` in this instance.                             |
| value     | The comment's value.                                                                     |
| user      | Details of the user who created the comment - id, first & last name, email & avatar url. |
| reactions | An array of objects describing the reactions and their reactants on the comment.         |

### Sample response

<!-- cspell:disable -->

```json
{
  "case_id": 42,
  "id": 126,
  "action": "COMMENTED",
  "value": "Comment value",
  "user": {
    "user_id": "1",
    "first_name": "John",
    "last_name": "Smith",
    "email": "john.smith@example.com",
    "avatar_url": "https://lh3.googleusercontent.com/a/QslEzz3Af-SGcswUnWBH7Fw-FKOAA=s96-c"
  },
  "reactions": [
    {
      "emoji": ":heart:",
      "reactants": [
        {
          "user_id": 1,
          "user_name": "John Smith",
          "reacted_at": "2024-03-12T10:06:38+00:00"
        }
      ]
    }
  ]
}
```

<!-- cspell:enable -->
