Messaging
Send and manage WhatsApp messages
Articles in this category
- Replying to an incoming message with a quote
- Handling duplicate webhook messages
- My webhook is not receiving events
- Scheduling messages from your application
- Why is my message sent but not delivered?
- Using webhooks
- Key compliance points to avoid account flagging or blocking
- Processing Media Messages from Webhook Events
- How to Use Polls as Buttons in WhatsApp
Replying to an incoming message with a quote
Keep the original message
To quote an incoming WhatsApp message, store the original webhook payload and pass its complete key and message objects back in replyToObject when calling POST /api/send-message.
Do not remove, rebuild or edit nested fields such as messageContextInfo, deviceListMetadata, senderPn, senderLid or remoteJid. Do not construct your own contextInfo.
Build the reply
For an incoming messages.upsert webhook, build your request from the saved objects:
const incoming = webhook.data.messages;
const payload = {
to: incoming.key.remoteJid,
text: "Thanks! We received your message.",
replyToObject: {
key: incoming.key,
message: incoming.message
}
};Send this payload using the session that received the message. Keep the original objects unchanged for @lid chats as well; do not rewrite their identifiers.
replyTo and replyToObject are different
replyTo accepts the integer msgId returned for a message previously sent through WasenderApi. It cannot be used to quote an incoming webhook message.
An incoming WhatsApp message ID is not a WasenderApi msgId. The message-info endpoint does not convert it into one. Use replyToObject for incoming messages.
If the quote is missing
Compare the saved webhook with your outgoing request to check for dropped or modified fields. Your application must retain the original objects needed for the quote.
For further help, contact support with your session ID, the original webhook and the send-message payload. Remove authorization headers, API keys and unrelated personal data while preserving the structure needed to diagnose the issue.
Still Need Help?
Can't find what you're looking for? Our support team is here to help.
