Send messages
Send reaction
React to a message with an emoji, or remove the reaction, with POST /v1/messages on WhatsApp, Instagram and Messenger.
POST /v1/messages with type: "reaction" puts an emoji on a message that already exists in the conversation. It works on WhatsApp, Instagram and Messenger. The fields shared by every send are in Common fields.
Before you start
Section titled “Before you start”- An API key with the
sendpermission (see Authentication). - An Active connection for the channel.
- A reaction follows the service window: outside 24 hours (windows) the send is refused.
React to a message
Section titled “React to a message”curl https://api.messajo.com/v1/messages \ -H "Authorization: Bearer $MESSAJO_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "connection_id": "conn_...", "to": "5511999999999", "type": "reaction", "reaction": { "message_id": "msg_...", "emoji": "👍" } }'import { Messajo } from "@messajo/sdk";
const messajo = new Messajo({ apiKey: process.env.MESSAJO_API_KEY! });
const sent = await messajo.messages.send({ "connection_id": "conn_...", "to": "5511999999999", "type": "reaction", "reaction": { "message_id": "msg_...", "emoji": "👍" }});n8n HTTP Request node settings
- Method:
POST - URL:
https://api.messajo.com/v1/messages - Authentication: Generic Credential Type, then Header Auth. Name:
Authorization; Value:Bearer mj_... - Headers: turn on Send Headers and add
Idempotency-Key(a unique value per item) - Body: turn on Send Body; Body Content Type: JSON; Specify Body: Using JSON
{ "connection_id": "conn_...", "to": "5511999999999", "type": "reaction", "reaction": { "message_id": "msg_...", "emoji": "👍" }}Replace mj_... with your API key.
Remove the reaction
Section titled “Remove the reaction”To take the reaction off, send the same body with an empty emoji.
curl https://api.messajo.com/v1/messages \ -H "Authorization: Bearer $MESSAJO_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "connection_id": "conn_...", "to": "5511999999999", "type": "reaction", "reaction": { "message_id": "msg_...", "emoji": "" } }'import { Messajo } from "@messajo/sdk";
const messajo = new Messajo({ apiKey: process.env.MESSAJO_API_KEY! });
const sent = await messajo.messages.send({ "connection_id": "conn_...", "to": "5511999999999", "type": "reaction", "reaction": { "message_id": "msg_...", "emoji": "" }});n8n HTTP Request node settings
- Method:
POST - URL:
https://api.messajo.com/v1/messages - Authentication: Generic Credential Type, then Header Auth. Name:
Authorization; Value:Bearer mj_... - Headers: turn on Send Headers and add
Idempotency-Key(a unique value per item) - Body: turn on Send Body; Body Content Type: JSON; Specify Body: Using JSON
{ "connection_id": "conn_...", "to": "5511999999999", "type": "reaction", "reaction": { "message_id": "msg_...", "emoji": "" }}Replace mj_... with your API key.
Fields
Section titled “Fields”| Field | Rule |
|---|---|
reaction.message_id |
The target message: the Messajo id (msg_…) or the Meta id. Messajo swaps msg_… for the Meta id before sending. 1 to 256 characters. |
reaction.emoji |
Up to 16 characters. An empty string ("") removes the reaction. |
Instagram like
Section titled “Instagram like”On Instagram, type: "like" sends the heart, with no body. It exists on Instagram only.
Common errors
Section titled “Common errors”not_found(404): themsg_…inmessage_iddoes not exist.outside_service_window(422): outside the 24 hours. The window end is indetails[0].message.validation_failed(400):emojiover 16 characters or an unknown field.