Reactions
The Reactions API lets you add or remove emoji reactions on messages. Reactions are supported on WhatsApp, Telegram, Messenger, Instagram, and Live Chat.
Required Scopes
| Scope | Purpose |
|---|---|
messages:create | Add and remove reactions |
Channel Support
| Channel | Reactions Supported |
|---|---|
| Yes | |
| Telegram | Yes |
| Messenger | Yes |
| Yes | |
| Live Chat | Yes |
| SMS | No |
| No |
Live Chat: the widget's "Allow reactions" setting
A Live Chat widget can turn reactions off (widget setting Allow reactions). When it is off, adding or removing a reaction on any message of that widget's conversations returns 403 with the code reactions_disabled, and the widget visitor cannot react either. Before you offer a reaction, read live_chat.allow_reactions from GET /conversations/{conversation_id}: it is false when the setting is off, and null/absent on channels other than Live Chat.
Add a Reaction
POST /api/v1/messages/{message_id}/react
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
emoji | string | Yes | Single emoji character |
curl
curl -X POST "https://api.sendseven.com/api/v1/messages/msg_abc123/react" \
-H "Authorization: Bearer s7_api_a1b2c3d4e5f6789012345678abcdef00" \
-H "Content-Type: application/json" \
-d '{"emoji": "\ud83d\udc4d"}'
Response
{
"success": true,
"message_id": "msg_abc123",
"external_id": "wamid.HBgNNDkxNTIxNTU4MDg2NRUCABIYFjNFQjBCNUYxMjdFRkI5",
"emoji": "\ud83d\udc4d",
"error": null,
"error_code": null,
"error_reason": null
}
If the platform rejects the reaction, the request still returns 200 with success: false. error holds the platform's message, error_code the provider error code, and error_reason a stable machine-readable reason when one is known:
{
"success": false,
"message_id": "msg_abc123",
"external_id": null,
"emoji": "\ud83d\udc4d",
"error": "Message failed to send because another app is controlling this thread now.",
"error_code": "131070",
"error_reason": "thread_controlled_by_other_app"
}
error_reason | Meaning |
|---|---|
thread_controlled_by_other_app | WhatsApp: another provider controls this conversation thread (error 131070). See Sending fails with 131070. |
Remove a Reaction
DELETE /api/v1/messages/{message_id}/react
curl
curl -X DELETE "https://api.sendseven.com/api/v1/messages/msg_abc123/react" \
-H "Authorization: Bearer s7_api_a1b2c3d4e5f6789012345678abcdef00" \
-H "Content-Type: application/json"
Response
{
"success": true,
"message_id": "msg_abc123",
"external_id": "wamid.HBgNNDkxNTIxNTU4MDg2NRUCABIYFjNFQjBCNUYxMjdFRkI5",
"emoji": null,
"error": null,
"error_code": null,
"error_reason": null
}
A platform rejection returns success: false with error, error_code and error_reason, as for adding a reaction.
Python Example
import requests
BASE_URL = "https://api.sendseven.com/api/v1"
HEADERS = {
"Authorization": "Bearer s7_api_a1b2c3d4e5f6789012345678abcdef00",
"Content-Type": "application/json",
}
# Add a thumbs-up reaction
response = requests.post(
f"{BASE_URL}/messages/msg_abc123/react",
headers=HEADERS,
json={"emoji": "\ud83d\udc4d"},
)
print(response.json())
# Remove the reaction
response = requests.delete(
f"{BASE_URL}/messages/msg_abc123/react",
headers=HEADERS,
)
print(response.json())
JavaScript Example
const BASE_URL = "https://api.sendseven.com/api/v1";
const HEADERS = {
"Authorization": "Bearer s7_api_a1b2c3d4e5f6789012345678abcdef00",
"Content-Type": "application/json",
};
// Add a reaction
await fetch(`${BASE_URL}/messages/msg_abc123/react`, {
method: "POST",
headers: HEADERS,
body: JSON.stringify({ emoji: "\ud83d\udc4d" }),
});
// Remove a reaction
await fetch(`${BASE_URL}/messages/msg_abc123/react`, {
method: "DELETE",
headers: HEADERS,
});
Error Responses
Errors return detail as a message string, except reactions_disabled, whose detail is an object {"code", "message"}. See Error Handling for the response shapes.
| Status | detail | Description |
|---|---|---|
| 400 | "Reactions are not supported on this channel. ..." | The message's channel has no reactions |
| 400 | "Cannot react to this message: no external message ID available. ..." | The message has not been sent to the platform yet |
| 401 | "Invalid or expired API token" | Token is invalid or expired |
| 403 | "Missing required permission(s): messages:create" | Token lacks the scope |
| 403 | {"code": "reactions_disabled", "message": "Reactions are turned off for this Live Chat widget ..."} | Live Chat only: the widget's Allow reactions setting is off |
| 404 | "Message not found" | Unknown message ID, or it belongs to another workspace |
| 422 | list of field errors | Invalid request body, for example a missing emoji |
Next Steps
- Send Text Messages -- plain text messaging
- Interactive Messages -- buttons and lists
- Carousel Messages -- multi-card carousels