React to a WhatsApp message
PUT
/v1/whatsapp/messages/{message_id}/reaction
const reaction = await bird.whatsapp.reaction.set("wam_01krdgeqcxet5s7t44vh8rt9mg", {
emoji: "\u{1F44D}",
});
console.log(reaction.id, reaction.emoji);reaction = client.whatsapp.reaction.set("wam_01krdgeqcxet5s7t44vh8rt9mg", emoji="\U0001f44d")
print(reaction.id, reaction.emoji)reaction, err := client.Whatsapp.Reaction.Set(context.Background(), "wam_01krdgeqcxet5s7t44vh8rt9mg", bird.WhatsappReactionSetParams{
Emoji: "\U0001F44D",
})
if err != nil {
log.Fatal(err)
}
fmt.Println(reaction.Id, reaction.Emoji)$reaction = $bird->whatsapp->reaction->set(
'wam_01krdgeqcxet5s7t44vh8rt9mg',
(new WhatsAppReactionUpsert())->setEmoji("\u{1F44D}"),
);
echo $reaction->getId(), ' ', $reaction->getEmoji();bird whatsapp reaction set <message-id> --emoji 👍curl -X PUT "https://us1.platform.bird.com/v1/whatsapp/messages/{message_id}/reaction" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"emoji": "👍"
}'Response202
{
"id": "war_01krdgeqcxet5s7t44vh8rt9mg",
"emoji": "👍"
}
Places an emoji reaction on a message this workspace received, the same way
tapping and holding a message in WhatsApp does.
You hold at most one reaction per message, so this replaces your existing
one rather than adding another. To take a reaction back entirely, delete it.
The 202 means the reaction was accepted, not that WhatsApp applied it.
Reactions carry no delivery or read receipt, so the furthest one gets is
sent. Read the message's reactions for what currently stands, or
List reaction events for a WhatsApp message
for what became of each change, including one WhatsApp refused.
Each of these returns a 422:
- A message this workspace sent. This endpoint places reactions on messages the contact sent; reacting to your own outbound message is not supported.
- More than one emoji, since WhatsApp takes exactly one.
A message Bird can no longer resolve returns a 404 instead. WhatsApp
accepts a reaction on a message up to 30 days old, but Bird keeps the
provider id a reaction needs for 15 days, so that is the practical age
limit. The message and its reaction log stay readable for 30; only the id
a placement needs is gone.
Reactions are not charged for.
Parameters
message_id
string
ID of the message to react to, as returned in the id field of the message. Must be a message this workspace received.
Request Payload
emoji
string
required
The emoji to place, as the character itself. Replaces your existing reaction on this message if you have one. To take a reaction back entirely, delete it rather than sending an empty value. WhatsApp takes exactly one emoji, so a value carrying more than one is refused with a 422 rather than sent. The length cap is generous because a single joined emoji is many code points: a couple-kissing one carrying two skin tones is ten, which is why the cap alone cannot express the limit.
Response Payload
id
string
required
ID of the reaction-log entry this request created, matching the id that entry carries in List reaction events for a WhatsApp message.
emoji
string
required
The emoji as accepted, echoing the one the request carried.
Related resources
Continue with the documentation, guides and examples for this topic. Resources are in English.
Understand the conceptShould I use a Bird SDK or call the API directly?Follow the learning pathBuild your first integrationImplementation guideSend your first email
Get an implementation brief