> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zavu.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Reaction Messages

> React to messages with emoji via WhatsApp

React to messages with emoji to acknowledge receipt or add context without sending a full reply.

## React to a Message

The easiest way to react is using the reactions endpoint:

<CodeGroup>
  ```typescript TypeScript theme={null}
  const reaction = await zavu.messages.react("msg_abc123", {
    emoji: "👍"
  });
  ```

  ```python Python theme={null}
  reaction = zavu.messages.react("msg_abc123", emoji="👍")
  ```

  ```ruby Ruby theme={null}
  reaction = client.messages.react("msg_abc123", emoji: "👍")
  ```

  ```go Go theme={null}
  reaction, err := client.Messages.React(context.TODO(), "msg_abc123", zavudev.ReactionParams{
      Emoji: zavudev.String("👍"),
  })
  ```

  ```php PHP theme={null}
  $reaction = $client->messages->react('msg_abc123', [
      'emoji' => '👍',
  ]);
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.zavu.dev/v1/messages/msg_abc123/reactions \
    -H "Authorization: Bearer zv_live_xxx" \
    -H "Content-Type: application/json" \
    -d '{
      "emoji": "👍"
    }'
  ```
</CodeGroup>

## React Using Message Type

You can also send a reaction as a message by specifying the WhatsApp message ID:

<CodeGroup>
  ```typescript TypeScript theme={null}
  const message = await zavu.messages.send({
    to: "+14155551234",
    channel: "whatsapp",
    messageType: "reaction",
    content: {
      emoji: "👍",
      reactToMessageId: "wamid.abc123..."
    }
  });
  ```

  ```python Python theme={null}
  message = zavu.messages.send(
      to="+14155551234",
      channel="whatsapp",
      message_type="reaction",
      content={
          "emoji": "👍",
          "react_to_message_id": "wamid.abc123..."
      }
  )
  ```

  ```ruby Ruby theme={null}
  message = client.messages.send(
    to: "+14155551234",
    channel: "whatsapp",
    message_type: "reaction",
    content: {
      emoji: "👍",
      react_to_message_id: "wamid.abc123..."
    }
  )
  ```

  ```go Go theme={null}
  message, err := client.Messages.Send(context.TODO(), zavudev.MessageSendParams{
      To:          zavudev.String("+14155551234"),
      Channel:     zavudev.String("whatsapp"),
      MessageType: zavudev.String("reaction"),
      Content: &zavudev.MessageContentParams{
          Emoji:            zavudev.String("👍"),
          ReactToMessageID: zavudev.String("wamid.abc123..."),
      },
  })
  ```

  ```php PHP theme={null}
  $message = $client->messages->send([
      'to' => '+14155551234',
      'channel' => 'whatsapp',
      'messageType' => 'reaction',
      'content' => [
          'emoji' => '👍',
          'reactToMessageId' => 'wamid.abc123...',
      ],
  ]);
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.zavu.dev/v1/messages \
    -H "Authorization: Bearer zv_live_xxx" \
    -H "Content-Type: application/json" \
    -d '{
      "to": "+14155551234",
      "channel": "whatsapp",
      "messageType": "reaction",
      "content": {
        "emoji": "👍",
        "reactToMessageId": "wamid.abc123..."
      }
    }'
  ```
</CodeGroup>

## Remove a Reaction

Send an empty string as the emoji to remove a reaction:

```json theme={null}
{
  "to": "+14155551234",
  "channel": "whatsapp",
  "messageType": "reaction",
  "content": {
    "emoji": "",
    "reactToMessageId": "wamid.abc123..."
  }
}
```

## Specifications

| Property         | Requirement                                     |
| ---------------- | ----------------------------------------------- |
| emoji            | Required, single emoji (empty string to remove) |
| reactToMessageId | Required, the WhatsApp message ID to react to   |

<Note>
  You can only react to messages within the 24-hour conversation window.
</Note>

## Use Cases

* Acknowledge message receipt
* Quick approval/rejection indicators
* Add emotional context
* Non-intrusive confirmations
