# Reaction Messages

> Send WhatsApp reaction emojis on existing messages. Acknowledge, agree or react to user messages without sending a full reply.

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:

```typescript
const reaction = await zavu.messages.react("msg_abc123", {
  emoji: "👍"
});
```

```bash
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": "👍"
  }'
```

## React Using Message Type

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

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

```bash
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..."
    }
  }'
```

## Remove a Reaction

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

```json
{
  "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.

## Use Cases

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