WasenderAPI

API Documentation

WasenderApi WhatsApp API

Send View Once Message

Messages

POST/api/send-message

Sends an image, video, or audio message that can only be viewed a single time.

Send View Once Media

This feature allows you to send media (an image, video, or audio file) that will disappear from the chat after the recipient has opened it once. It uses the same /api/send-message endpoint as other message types.

To enable this functionality, you must include the viewOnce: true parameter in your request body, along with the media url (imageUrl, videoUrl, or audioUrl).

The recipient will see a placeholder indicating a "View Once" message and will not be able to save, forward, or screenshot the media (on most devices).

Parameters

NameTypeRequiredDescription
tostringYesRecipient's JID (e.g., [email protected] or [email protected]).
viewOncebooleanYesMust be set to `true` to send the media as a view-once message.
imageUrlstringNoThe direct URL of the image to be sent. Required if `videoUrl` or `audioUrl` are not provided.
videoUrlstringNoThe direct URL of the video to be sent. Required if `imageUrl` or `audioUrl` are not provided.
audioUrlstringNoThe direct URL of the audio to be sent. Required if `imageUrl` or `videoUrl` are not provided.

Code Examples

curl -X POST "https://www.wasenderapi.com/api/send-message" 
  -H "Authorization: Bearer YOUR_API_KEY" 
  -H "Content-Type: application/json" 
  -d '{
    "to": "[email protected]",
    "imageUrl":"https://example.com/image.jpg",
    "viewOnce": true
}'

Response Examples

{
    "success": true,
    "data": {
        "msgId": 100002,
        "jid": "[email protected]",
        "status": "in_progress"
    }
}