## Add or remove a reaction to a message

`client.Messages.AddReaction(ctx, messageID, body) (*MessageAddReactionResponse, error)`

**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

- `messageID string`

- `body MessageAddReactionParams`

  - `Operation param.Field[MessageAddReactionParamsOperation]`

    Whether to add or remove the reaction

    - `const MessageAddReactionParamsOperationAdd MessageAddReactionParamsOperation = "add"`

    - `const MessageAddReactionParamsOperationRemove MessageAddReactionParamsOperation = "remove"`

  - `Type param.Field[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.

  - `CustomEmoji param.Field[string]`

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

  - `PartIndex param.Field[int64]`

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

### Returns

- `type MessageAddReactionResponse struct{…}`

  - `Message string`

  - `Status string`

  - `TraceID string`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/linq-team/linq-go"
  "github.com/linq-team/linq-go/option"
  "github.com/linq-team/linq-go/shared"
)

func main() {
  client := linqgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.Messages.AddReaction(
    context.TODO(),
    "69a37c7d-af4f-4b5e-af42-e28e98ce873a",
    linqgo.MessageAddReactionParams{
      Operation: linqgo.MessageAddReactionParamsOperationAdd,
      Type: shared.ReactionTypeLove,
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.TraceID)
}
```

#### Response

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