Reactions (Tapbacks) API
Add iMessage tapback reactions via the Sendblue API
Send iMessage tapback reactions to messages. Tapbacks are the heart, thumbs up, and other reactions that appear on messages in iMessage.
Send a Reaction
Section titled “Send a Reaction”Add a tapback reaction to a message.
POST https://api.sendblue.co/api/send-reactionRequest Body
Section titled “Request Body”| Parameter | Type | Required | Description |
|---|---|---|---|
from_number | string | Yes | Your Sendblue line number (E.164 format) |
message_handle | string | Yes | The message handle/GUID to react to (from inbound webhook) |
reaction | string | Yes | The reaction type to send |
part_index | number | No | For multi-part messages (default: 0) |
Valid Reaction Types
Section titled “Valid Reaction Types”| Reaction | Description |
|---|---|
love | Heart reaction |
like | Thumbs up |
dislike | Thumbs down |
laugh | Ha ha reaction |
emphasize | Double exclamation |
question | Question mark |
Example Request
Section titled “Example Request”curl -X POST 'https://api.sendblue.co/api/send-reaction' \ -H 'sb-api-key-id: YOUR_API_KEY' \ -H 'sb-api-secret-key: YOUR_API_SECRET' \ -H 'Content-Type: application/json' \ -d '{ "from_number": "+19175551234", "message_handle": "E8F2C3D1-A5B7-4E9F-8C1D-2A3B4C5D6E7F", "reaction": "love" }'Node.js Example
Section titled “Node.js Example”const axios = require('axios');
await axios.post( 'https://api.sendblue.co/api/send-reaction', { from_number: '+19175551234', message_handle: 'E8F2C3D1-A5B7-4E9F-8C1D-2A3B4C5D6E7F', reaction: 'love' }, { headers: { 'sb-api-key-id': 'YOUR_API_KEY', 'sb-api-secret-key': 'YOUR_API_SECRET', 'Content-Type': 'application/json' } });Success Response (200)
Section titled “Success Response (200)”{ "status": "OK", "message": "Reaction request sent", "message_handle": "E8F2C3D1-A5B7-4E9F-8C1D-2A3B4C5D6E7F", "reaction": "love"}Error Responses
Section titled “Error Responses”Missing from_number (400)
Section titled “Missing from_number (400)”{ "status": "ERROR", "message": "You must specify a valid `from_number` in the request body."}Missing message_handle (400)
Section titled “Missing message_handle (400)”{ "status": "ERROR", "message": "You must specify `message_handle` in the request body."}Invalid Reaction (400)
Section titled “Invalid Reaction (400)”{ "status": "ERROR", "message": "Invalid reaction. Must be one of: love, like, dislike, laugh, emphasize, question"}Invalid part_index (400)
Section titled “Invalid part_index (400)”{ "status": "ERROR", "message": "`part_index` must be a non-negative integer."}Line Not Found (404)
Section titled “Line Not Found (404)”{ "status": "ERROR", "message": "The from_number is not registered"}-
Message Handle: The
message_handlecomes from inbound webhooks as themessage_handlefield. This is the Apple GUID for the message. -
iMessage Only: Reactions only work on iMessage conversations, not SMS.
-
Timing: Reactions can be sent to messages received within the last few days. Very old messages may not accept reactions.
-
Multi-part Messages: Use
part_indexwhen reacting to a specific part of a multi-part message (e.g., an image in a message that also has text).