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

# React to message

> Send or remove an emoji reaction to a WhatsApp message in the conversation thread

Send an emoji reaction (such as `👍`, `❤️`, `😂`, `😮`, `😢`, `🙏`) to a WhatsApp message, or send an empty string `""` to remove a previously placed reaction. Reacting triggers the Meta WhatsApp Cloud API and broadcasts a real-time `message_status_updated` event over organization WebSockets.

***

### Authentication

This endpoint requires Bearer token authentication.

```http theme={null}
Authorization: Bearer <token>
```

| Header          | Type     | Required | Description                                     | Format           |
| :-------------- | :------- | :------- | :---------------------------------------------- | :--------------- |
| `Authorization` | `string` | **Yes**  | Scoped organization API key or Bearer JWT token | `Bearer <token>` |

***

### Path Parameters

<ParamField header="Authorization" type="string" required>
  Bearer token for authentication. Format: `Bearer <token>`.
</ParamField>

<ParamField path="message_id" type="string" required>
  Unique UUID identifier of the message to react to. Must be a message with an associated WhatsApp message ID.
</ParamField>

***

### Request Body

<ParamField body="emoji" type="string">
  Single emoji character (e.g. `👍`, `❤️`, `🔥`). Provide `null` or an empty string `""` to remove a reaction.
</ParamField>

***

### Response Fields

<ResponseField name="success" type="boolean">
  Indicates whether the reaction was accepted and dispatched to Meta WhatsApp servers.
</ResponseField>

***

<RequestExample>
  ```bash cURL Add Reaction theme={null}
  curl -X POST "https://api.sayvy.ai/api/v1/inbox/messages/2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e/react" \
    -H "Authorization: Bearer <token>" \
    -H "Content-Type: application/json" \
    -d '{
      "emoji": "👍"
    }'
  ```

  ```bash cURL Remove Reaction theme={null}
  curl -X POST "https://api.sayvy.ai/api/v1/inbox/messages/2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e/react" \
    -H "Authorization: Bearer <token>" \
    -H "Content-Type: application/json" \
    -d '{
      "emoji": ""
    }'
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.sayvy.ai/api/v1/inbox/messages/2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e/react"
  headers = {
      "Authorization": "Bearer <token>",
      "Content-Type": "application/json"
  }
  payload = {
      "emoji": "👍"
  }

  response = requests.post(url, headers=headers, json=payload)
  print(response.status_code)
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.sayvy.ai/api/v1/inbox/messages/2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e/react", {
    method: "POST",
    headers: {
      "Authorization": "Bearer <token>",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      emoji: "👍"
    })
  });

  const data = await response.json();
  console.log(data);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "success": true
  }
  ```

  ```json 400 Bad Request theme={null}
  {
    "detail": "Cannot react to a message without a WhatsApp message ID"
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "detail": "Message not found"
  }
  ```
</ResponseExample>
