Skip to main content

Sending Messages

All messages are sent through a single endpoint. The type field determines what kind of message is sent, and the remaining fields change accordingly. Endpoint:
Headers:

Text Message

Send a plain text message.
Response:

Image Message

Send an image with an optional caption.

Video Message

Send a video file with an optional caption.

Audio Message

Send an audio file. Audio messages appear as voice messages in WhatsApp.
For the best compatibility, use .ogg files encoded with the Opus codec for voice messages.

Document Message

Send a file as a document attachment.

Location Message

Send a geographic location pin.

Poll Message

Create an interactive poll. Recipients can vote on options directly in WhatsApp.

Contact / vCard Message

Share a contact card.

Forward Message

Forward an existing message to another chat.

Reaction

React to a message with an emoji.
To remove a reaction, send an empty string as the reaction value.

Advanced Features

Reply to a Message

Quote a previous message by including quoted_message_id. This works with any message type.

Edit a Sent Message

Edit a message you previously sent by providing edit_message_id.
You can only edit messages that you sent. Editing has a time window limitation imposed by WhatsApp (approximately 15 minutes after sending).

Mentions

Mention specific contacts in a group message. The mentioned contacts will receive a notification.

Chat ID Formats


Brazilian Phone Numbers

Wappfy automatically handles the Brazilian 9th digit issue. If a message fails with a “no LID found” error, the system will automatically retry with the alternate format (adding or removing the 9th digit).For example, if 5511999998888 fails, it will retry with 551199998888, and vice versa. This happens transparently — you do not need to handle it yourself.

Message Type Reference


Error Handling