## Add or remove a reaction to a message

`messages.add_reaction(strmessage_id, MessageAddReactionParams**kwargs)  -> MessageAddReactionResponse`

**post** `/v3/messages/{messageId}/reactions`

Add or remove emoji reactions to messages. Reactions let users express
their response to a message without sending a new message.

**Supported Reactions:**

- love ❤️
- like 👍
- dislike 👎
- laugh 😂
- emphasize ‼️
- question ❓
- custom - any emoji (use `custom_emoji` field to specify)

### Parameters

- `message_id: str`

- `operation: Literal["add", "remove"]`

  Whether to add or remove the reaction

  - `"add"`

  - `"remove"`

- `type: ReactionType`

  Type of reaction. Standard iMessage tapbacks are love, like, dislike, laugh, emphasize, question.
  Custom emoji reactions have type "custom" with the actual emoji in the custom_emoji field.
  Sticker reactions have type "sticker" with sticker attachment details in the sticker field.

  - `"love"`

  - `"like"`

  - `"dislike"`

  - `"laugh"`

  - `"emphasize"`

  - `"question"`

  - `"custom"`

  - `"sticker"`

- `custom_emoji: Optional[str]`

  Custom emoji string. Required when type is "custom".

- `part_index: Optional[int]`

  Optional index of the message part to react to.
  If not provided, reacts to the entire message (part 0).

### Returns

- `class MessageAddReactionResponse: …`

  - `message: Optional[str]`

  - `status: Optional[str]`

  - `trace_id: Optional[str]`

### Example

```python
import os
from linq import LinqAPIV3

client = LinqAPIV3(
    api_key=os.environ.get("LINQ_API_V3_API_KEY"),  # This is the default and can be omitted
)
response = client.messages.add_reaction(
    message_id="69a37c7d-af4f-4b5e-af42-e28e98ce873a",
    operation="add",
    type="love",
)
print(response.trace_id)
```

#### Response

```json
{
  "message": "Reaction processed",
  "status": "accepted",
  "trace_id": "trace_id"
}
```
