Chat Message Reactions
List of valid attributes:
Attribute | Description | Specifics |
---|---|---|
author_id | ID of the user who reacted to the message | Cannot be set |
message_id | ID of the message that received the reaction | Cannot be set |
reaction | Reaction of the message (emoji) | Must not be empty, Allowed emojis: 😀 👍 👎 ❤️ ✅ 🙏 |
Create
Example request:
{ "data": { "type": "message_reaction", "attributes": { "reaction": "👍" } }}
Example response:
{ "data": [ { "id": "f5139073-dc7d-434e-989e-99786b7535a1", "type": "message_reaction", "attributes": { ... } } ]}
This endpoint creates a message reaction for a message in a chat.
HTTP Request
POST /api/v1/messages/:message_id/reactions
URL Parameters
Parameter | Description |
---|---|
message_id | ID of the message that we want to react to |
List
Example response:
{ "data": [ { "id": "0e2eb81a-f952-4e8d-a6f8-9f757459a241", "type": "message_reaction", "attributes": { ... } }, { ... } ]}
This endpoint returns reactions of a chat message.
HTTP Request
GET /api/v1/messages/:message_id/reactions
URL Parameters
Parameter | Description |
---|---|
message_id | ID of the message to get reactions for |
Delete
Example response
{ "data": { "id": "092ff7d2-abad-44e8-af38-d1c427a8b16d", "type": "message_reaction", "attributes": { ... } }}
This endpoint deletes a reaction to a chat message. Each user can only delete their own reactions.
HTTP Request
DELETE /api/v1/messages/:message_id/reactions/:reaction_id
URL Parameters
Parameter | Description |
---|---|
message_id | ID of the message that received the reaction |
reaction_id | ID of the reaction to delete |