Event is triggered for all messages in your session, both incoming and outgoing. To listen only for incoming events, please refer to messages.received.
Webhook Event: messages.upsert
This event is triggered for all messages in your session, both incoming and outgoing. To listen only for incoming events, please refer to messages.received. The payload includes the message content, sender information, and message key.
See the code example below for a typical payload structure.
To learn more about handling media in this event, please refer to the help center article on handling media messages.
Code Examples
{
"event": "messages.upsert",
"timestamp": 1633456789,
"data": {
"key": {
"id": "message-id-123",
"fromMe": false,
"remoteJid": "+1234567890"
},
"message": {
"conversation": "Hello, I have a question"
}
}
}