Sign inGet started

Sending WhatsApp reactions

React to a contact's message with an emoji, such as a thumbs up to acknowledge their reply. You can replace your reaction or remove it later.

Prerequisites

You need an API key with WhatsApp write permission and the Bird message ID (wam_…) of a message your workspace received. Use data.whatsapp_id from whatsapp.received, or the message's id from the WhatsApp log.
Replace the example message ID with the ID of a message your workspace received. Initialize the client for your language using the TypeScript, Python, Go, or PHP SDK guide. For CLI examples, install and authenticate the CLI with WhatsApp write access. Use the API host for your workspace region in cURL requests.

1. Add a reaction

Call React to a WhatsApp message with one emoji:
const reaction = await bird.whatsapp.reaction.set("wam_01krdgeqcxet5s7t44vh8rt9mg", {
  emoji: "👍",
});
console.log(reaction.id, reaction.emoji);
The API returns 202 with the accepted reaction's id (war_…) and emoji. Save the reaction ID to find its outcome in the reaction log. Acceptance does not confirm that WhatsApp applied the reaction.
You hold one reaction per message. To replace it, repeat the PUT request with a different emoji. Reactions are not charged for.

2. Check the reaction outcome

Retrieve the message to see its current reactions, with one entry per sender. For the outcome of a particular change, list the message's reaction events and find the saved reaction ID.
The reaction log records terminal outcomes: sent means WhatsApp accepted your change, failed means WhatsApp refused it, and rejected means Bird refused it before transmission. Inspect the event's error for a failed or rejected change. A pending reaction has no log entry yet. Reactions have no delivery or read receipts and no outbound reaction webhook.

3. Remove your reaction

Call Remove a WhatsApp reaction with the same message ID:
await bird.whatsapp.reaction.remove("wam_01krdgeqcxet5s7t44vh8rt9mg");
The API returns 202 with no response body. Removal is processed asynchronously; check the message's current reactions or its reaction log to confirm the outcome. A removal log entry has emoji: null. Removing an absent reaction is safe, and this operation removes your workspace's reaction, not the contact's.

Troubleshooting

  • 404 (E15071): Check the target message ID and workspace. Bird retains the message reference needed to add or remove a reaction for 15 days.
  • 422 (E01001): Use a received message and a single emoji. You cannot react to a message your workspace sent. A joined emoji counts as one emoji; two separate emoji do not.
  • Reaction unchanged after 202: Inspect the reaction log for a failed or rejected change. A successful HTTP response confirms acceptance for processing.

Next steps