Reactions API
Set or remove reaction
POST /messages/reaction
If isSet is false - any previous of this user to this post reaction will be removed (set to undefined).
When removing reaction currently value of reaction is ignored. This behaviour may be changed later.
NOTE: x-timestamp in header is REQUIRED to properly handle the queue of reaction changes.
Can be sent via WebSocket as request reaction
If reactions not permitted in the chat - 403 error returned.
If timestamp is older than in previous request - 409 error returned.
Parameters (body)
| name |
type |
data type |
description |
| chatId |
required |
string |
chat ID |
| messageId |
required |
number |
message ID in the chat |
| reaction |
optional |
string |
string representation of reaction |
| isSet |
required |
boolean |
set or remove reaction |
| clientMessageId |
required |
string |
clientMessageId of original message |
Responses
| http code |
content-type |
response |
200 |
application/json |
{...see example} |
400 |
application/json |
{"error": "Failed...","timestamp": 1737195610743,"status": 400} |
401 |
application/json |
{"error": "Unauthorized","timestamp": 1737195610743,"status": 401} |
403 |
application/json |
{"error": "Reaction not allowed","timestamp": 1737195610743,"status": 403} |
409 |
application/json |
{"error": "Unauthorized","timestamp": 1737195610743,"status": 401} |
500 |
application/json |
{"error": "Something went wrong","timestamp": 1737195610743,"status": 500} |
Example Request
{
"chatId": "string",
"messageId": 0,
"reaction": "string",
"isSet": true,
"clientMessageId": "string"
}
Example Response
{
"chatId": "string",
"messageId": 0,
"reaction": "string",
"isSet": true,
"clientMessageId": "string"
}
Set allowed reactions for Group Chat
POST /chat/allowReactions
Admin should have editGroup permission to set Allowed Reactions.
Pass object with undefined reactions - to enable reactions to messages in the Group
Pass an empty array [] in reactions param to disable any Reaction.
Pass reactions list ["👍", "❤️"] in reactions param to append them to Currently allowed.
If you need to Replace current allowed reaction - first make this call with an empty or undefined list
Parameters (body)
| name |
type |
data type |
description |
| chatId |
required |
string |
chat ID |
| reactions |
optional |
string[] |
allowed reactions |
Responses
| http code |
content-type |
response |
200 |
application/json |
{} |
400 |
application/json |
{"error": "Failed...","timestamp": 1737195610743,"status": 400} |
401 |
application/json |
{"error": "Unauthorized","timestamp": 1737195610743,"status": 401} |
500 |
application/json |
{"error": "Something went wrong","timestamp": 1737195610743,"status": 500} |
Example Request
{
"chatId": "string",
"reactions": ["👍", "❤️"]
}
Example Response
Get allowed reactions for Group Chat
GET /chat/allowReactions
Reactions undefined - means all reactions are possible for messages in the Group
Empty array [] in reactions - no allowed Reaction.
Reactions list ["👍", "❤️"] in reactions - Currently allowed list of reactions.
Parameters (query)
| name |
type |
data type |
description |
| chatId |
required |
string |
chat ID |
Responses
| http code |
content-type |
response |
200 |
application/json |
{chatId: "id", "reactions": ["👍", "❤️"]} |
400 |
application/json |
{"error": "Failed...","timestamp": 1737195610743,"status": 400} |
401 |
application/json |
{"error": "Unauthorized","timestamp": 1737195610743,"status": 401} |
500 |
application/json |
{"error": "Something went wrong","timestamp": 1737195610743,"status": 500} |
Example Response
{
"chatId": "string",
"reactions": ["👍", "❤️"]
}