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

# Reagir a Mensagem

<Card title="Webhook relacionado: Reação" icon="bolt" href="/webhook-reference/events/reacao" horizontal>
  Uma reação dispara o evento **Reação** (emoji + id da mensagem).
</Card>

## Descrição

Este endpoint permite reagir a uma mensagem enviada, especificando o ID da mensagem e a reação desejada (emoji). Para remover a reação, envie `"remove"` no campo message.

### Parâmetros

<ParamField body="appkey" type="string" required>
  Chave de aplicação.
</ParamField>

<ParamField body="authkey" type="string" required>
  Chave de autenticação do usuário.
</ParamField>

<ParamField body="to" type="string" required>
  Número de telefone no formato internacional ou ID do grupo.
</ParamField>

<ParamField body="message" type="string" required>
  Emoji da reação (ex: `"🧡"`) ou `"remove"` para remover a reação.
</ParamField>

<ParamField body="id" type="string" required>
  ID da mensagem à qual a reação será adicionada.
</ParamField>

<ParamField body="reactionMessage" type="string" required>
  Define se a operação é uma reação. Valor fixo `"true"`.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://chatbot.menuia.com/api/create-message \
    -H "Content-Type: application/json" \
    -d '{
      "appkey": "SUA_APPKEY_AQUI",
      "authkey": "SUA_AUTHKEY_AQUI",
      "to": "+5511999999999",
      "message": "🧡",
      "id": "F6FDB3FBB46DF8ABD6CB98C95F6251A",
      "reactionMessage": "true"
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://chatbot.menuia.com/api/create-message', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      appkey: 'SUA_APPKEY_AQUI',
      authkey: 'SUA_AUTHKEY_AQUI',
      to: '+5511999999999',
      message: '🧡',
      id: 'F6FDB3FBB46DF8ABD6CB98C95F6251A',
      reactionMessage: 'true'
    })
  });
  ```

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

  response = requests.post(
      'https://chatbot.menuia.com/api/create-message',
      json={
          'appkey': 'SUA_APPKEY_AQUI',
          'authkey': 'SUA_AUTHKEY_AQUI',
          'to': '+5511999999999',
          'message': '🧡',
          'id': 'F6FDB3FBB46DF8ABD6CB98C95F6251A',
          'reactionMessage': 'true'
      }
  )
  ```

  ```php PHP theme={null}
  $response = Http::post('https://chatbot.menuia.com/api/create-message', [
      'appkey' => 'SUA_APPKEY_AQUI',
      'authkey' => 'SUA_AUTHKEY_AQUI',
      'to' => '+5511999999999',
      'message' => '🧡',
      'id' => 'F6FDB3FBB46DF8ABD6CB98C95F6251A',
      'reactionMessage' => 'true'
  ]);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Sucesso theme={null}
  {
    "status": 200,
    "message": "Reação enviada com sucesso."
  }
  ```

  ```json 401 - Erro de validação theme={null}
  {
    "status": 401,
    "message": "validation.required"
  }
  ```

  ```json 404 - Dispositivo não encontrado theme={null}
  {
    "status": 404,
    "message": "Nenhum dispositivo encontrado."
  }
  ```
</ResponseExample>
