Messaging
Send reaction
Send an emoji reaction to a message
POST
/
message
/
sendReaction
/
:instanceName
Send reaction
curl --request POST \
--url https://api.example.com/message/sendReaction/:instanceName \
--header 'Content-Type: application/json' \
--data '
{
"key": {
"remoteJid": "<string>",
"fromMe": true,
"id": "<string>"
},
"reaction": "<string>"
}
'import requests
url = "https://api.example.com/message/sendReaction/:instanceName"
payload = {
"key": {
"remoteJid": "<string>",
"fromMe": True,
"id": "<string>"
},
"reaction": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
key: {remoteJid: '<string>', fromMe: true, id: '<string>'},
reaction: '<string>'
})
};
fetch('https://api.example.com/message/sendReaction/:instanceName', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/message/sendReaction/:instanceName",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'key' => [
'remoteJid' => '<string>',
'fromMe' => true,
'id' => '<string>'
],
'reaction' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/message/sendReaction/:instanceName"
payload := strings.NewReader("{\n \"key\": {\n \"remoteJid\": \"<string>\",\n \"fromMe\": true,\n \"id\": \"<string>\"\n },\n \"reaction\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/message/sendReaction/:instanceName")
.header("Content-Type", "application/json")
.body("{\n \"key\": {\n \"remoteJid\": \"<string>\",\n \"fromMe\": true,\n \"id\": \"<string>\"\n },\n \"reaction\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/message/sendReaction/:instanceName")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"key\": {\n \"remoteJid\": \"<string>\",\n \"fromMe\": true,\n \"id\": \"<string>\"\n },\n \"reaction\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"key": {},
"message": {}
}Request
React to a message with an emoji. Reactions appear next to the message and are visible to all chat participants.string
required
Name of the instance
Body parameters
object
required
Message key identifying the message to react to
Show Key properties
Show Key properties
string
required
Chat JID (e.g., “5511999999999@s.whatsapp.net” for individual, “123456789@g.us” for group)
boolean
required
Whether the message to react to is from you (true) or from the other participant (false)
string
required
Message ID to react to
string
required
Emoji to react with (e.g., ”👍”, “❤️”, ”😂”). Use an empty string "" to remove a reaction.
Response
object
Message key information
object
Reaction message details
Example request
curl -X POST https://your-api.com/message/sendReaction/my-instance \
-H "apikey: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"key": {
"remoteJid": "5511999999999@s.whatsapp.net",
"fromMe": false,
"id": "3EB0F2F5E6B5F5B5F5B5F5B5F5B5F5B5"
},
"reaction": "👍"
}'
const response = await fetch('https://your-api.com/message/sendReaction/my-instance', {
method: 'POST',
headers: {
'apikey': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
key: {
remoteJid: '5511999999999@s.whatsapp.net',
fromMe: false,
id: '3EB0F2F5E6B5F5B5F5B5F5B5F5B5F5B5'
},
reaction: '👍'
})
});
const data = await response.json();
console.log(data);
Common reactions
Add a reaction
Add a reaction
Send any emoji as the Common reactions:
reaction value:{
"key": { ...messageKey },
"reaction": "❤️"
}
- 👍 Thumbs up
- ❤️ Heart
- 😂 Laughing
- 😮 Surprised
- 😢 Sad
- 🙏 Thank you
Remove a reaction
Remove a reaction
To remove your reaction, send an empty string:
{
"key": { ...messageKey },
"reaction": ""
}
Getting the message key
To react to a message, you need its message key. You can obtain this from:- Webhook events: When you receive a message via webhook, the
keyobject is included - Send message response: When you send a message, the response includes the message
key - Message history: Retrieve messages using the chat endpoints
The message key format varies:
- Individual chats:
number@s.whatsapp.net - Group chats:
groupId@g.us - Business chats:
number@lid(for Business API)
You can change your reaction by sending a new reaction to the same message. The previous reaction will be replaced.
Send reaction
curl --request POST \
--url https://api.example.com/message/sendReaction/:instanceName \
--header 'Content-Type: application/json' \
--data '
{
"key": {
"remoteJid": "<string>",
"fromMe": true,
"id": "<string>"
},
"reaction": "<string>"
}
'import requests
url = "https://api.example.com/message/sendReaction/:instanceName"
payload = {
"key": {
"remoteJid": "<string>",
"fromMe": True,
"id": "<string>"
},
"reaction": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
key: {remoteJid: '<string>', fromMe: true, id: '<string>'},
reaction: '<string>'
})
};
fetch('https://api.example.com/message/sendReaction/:instanceName', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/message/sendReaction/:instanceName",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'key' => [
'remoteJid' => '<string>',
'fromMe' => true,
'id' => '<string>'
],
'reaction' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/message/sendReaction/:instanceName"
payload := strings.NewReader("{\n \"key\": {\n \"remoteJid\": \"<string>\",\n \"fromMe\": true,\n \"id\": \"<string>\"\n },\n \"reaction\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/message/sendReaction/:instanceName")
.header("Content-Type", "application/json")
.body("{\n \"key\": {\n \"remoteJid\": \"<string>\",\n \"fromMe\": true,\n \"id\": \"<string>\"\n },\n \"reaction\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/message/sendReaction/:instanceName")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"key\": {\n \"remoteJid\": \"<string>\",\n \"fromMe\": true,\n \"id\": \"<string>\"\n },\n \"reaction\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"key": {},
"message": {}
}