--- title: Reactions (Tapbacks) API | Sendblue Docs description: 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 Add a tapback reaction to a message. ``` POST https://api.sendblue.co/api/send-reaction ``` ### 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 | Reaction | Description | | ----------- | ------------------ | | `love` | Heart reaction | | `like` | Thumbs up | | `dislike` | Thumbs down | | `laugh` | Ha ha reaction | | `emphasize` | Double exclamation | | `question` | Question mark | ### Example Request Terminal window ``` 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 ``` 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) ``` { "status": "OK", "message": "Reaction request sent", "message_handle": "E8F2C3D1-A5B7-4E9F-8C1D-2A3B4C5D6E7F", "reaction": "love" } ``` --- ## Error Responses ### Missing from\_number (400) ``` { "status": "ERROR", "message": "You must specify a valid `from_number` in the request body." } ``` ### Missing message\_handle (400) ``` { "status": "ERROR", "message": "You must specify `message_handle` in the request body." } ``` ### Invalid Reaction (400) ``` { "status": "ERROR", "message": "Invalid reaction. Must be one of: love, like, dislike, laugh, emphasize, question" } ``` ### Invalid part\_index (400) ``` { "status": "ERROR", "message": "`part_index` must be a non-negative integer." } ``` ### Line Not Found (404) ``` { "status": "ERROR", "message": "The from_number is not registered" } ``` ## Notes 1. **Message Handle**: The `message_handle` comes from inbound webhooks as the `message_handle` field. This is the Apple GUID for the message. 2. **iMessage Only**: Reactions only work on iMessage conversations, not SMS. 3. **Timing**: Reactions can be sent to messages received within the last few days. Very old messages may not accept reactions. 4. **Multi-part Messages**: Use `part_index` when reacting to a specific part of a multi-part message (e.g., an image in a message that also has text).