Skip to main content

Send Mention Text

Instructions:

Swap the existing content between [ ] for whatever matches your scenario or need.

MethodEndpoint
POST[baseUrl]/message/sendText/[instance]

Send a message in a group, mentioning one or several participants, without the need to include @name in the message content.

Note:

Use this feature sparingly, as in a group where participants have chosen to mute notifications, they will still be notified and tagged with the @.

Excessive use in a group with many members in this condition may cause dissatisfaction and result in an effect contrary to the desired one.

Data to be sent in the Request​

{
"number": "[groupJid]",
"options": {
"delay": 1200,
"presence": "composing",
"mentions": {
"everyOne": false,
"mentioned": ["[remoteJid]"]
}
},
"textMessage": {
"text": "Mention text message, sent with the _Evolution-API_ πŸš€.\n\nHere you can send texts in *bold*, _italic_, ~strikethrough~ and `monospaced`.\n\nYou can also use any available emoticon on WhatsApp, like these examples below:\n\nπŸ˜‰πŸ€£πŸ€©πŸ€πŸ‘πŸ‘πŸ™"
}
}

Data returned from the Request​

{
"key": {
"remoteJid": "[groupJid]",
"fromMe": true,
"id": "BAE500F92531D3E2"
},
"message": {
"extendedTextMessage": {
"text": "Mention text message, sent with the _Evolution-API_ πŸš€.\n\nHere you can send texts in *bold*, _italic_, ~strikethrough~ and `monospaced`.\n\nYou can also use any available emoticon on WhatsApp, like these examples below:\n\nπŸ˜‰πŸ€£πŸ€©πŸ€πŸ‘πŸ‘πŸ™",
"contextInfo": {
"mentionedJid": ["[remoteJid]@s.whatsapp.net"]
}
}
},
"messageTimestamp": "1689620558",
"status": "PENDING",
"participant": "[sender]@s.whatsapp.net"
}

Explanation of Parameters​

ParameterTypeDescription
numberRequiredEnter the groupJid to whom the message will be sent.

groupJid = Accepts the group identifier in hash format for new groups, or remoteJid + "-" + timestamp for old groups. In this case, it is mandatory to inform the @g.us ending.

Ex: 120363024158769234@g.us or 5511911111111-1111111111@g.us
options.delayOptionalTime in milliseconds that the message must wait until it is sent, showing the presence information configured in the next item.
options.presenceOptionalThe "composing" content will make the message "typing" appear in the WhatsAppβ„’ top menu, during the time defined in the previous item.
options.mentions.everyOneRequiredTo mention one or more participants, enter "false".

Accepted values ​​are "true" or "false".

To mention all, it will be explained in the next item.
options.mentions.mentionedRequiredEnter the remoteJid of one or more participants that will be mentioned in the group.

remoteJid = Number in DDI + DDD + Number format, with or without the @s.whatsapp.net ending.

Ex: 5511911111111 or 5511911111111@s.whatsapp.net

If you want to inform more than one participant, just separate the contacts with commas, as in the example below:

- 551191111111,
- 5511922222222,
- 5511933333333
textMessage.textRequiredInform the text of the message you want to send, being able to use the same resources you would use in the app or on the web, which are:

- Emojis
- Bold, enter *yourtext*
- Italics, between _yourtext_
- Scratched, come in ~yourtext~
- Monospace between ```yourtext```

To break a line, enter "\n" in the message.

Check the example in the payload for better understanding.
Note:

Every message sent by the Evolution API initially has the status PENDING.

This indicates that the sending was successful and the message is waiting for the following statuses, which will be sent to the MESSAGES_UPDATE Webhook.

Warning:

It is extremely necessary that the payload obey the rules for creating a JSON file, considering the correct arrangement of items, formatting, square brackets, braces and commas, etc.

Before consuming the endpoint, if you have questions about the JSON formatting, go to https://jsonlint.com/ and validate.