Sending Media Message
Use the messages node to send messages containing audio, documents, images, stickers, or videos to your customers.
Currently, there are two ways to send media messages with the WhatsApp Business API:
IDs — To use an ID, you must first upload the media using the media node to obtain the ID required for the messages API call. Links — To use a link, you supply an HTTP(S) link from which the application will download the media, saving you the step of uploading media yourself.
When you send a message that includes media, you must provide either the ID of the uploaded media or a link to the media in the request body. You must also specify the type of media that you are sending: audio, document, image, sticker, or video.
After you upload the media, use the returned ID for the id field in the API call sending the media message. Alternatively, you can provide a link parameter pointing to the media you want to send (currently only HTTP/HTTPS links are supported).
Note: Either id or link is required, but should not be used at the same time.
Request
- Base URLhttps://apis.cequens.com/conversation
- URLhttps://apis.cequens.com/conversation/wab/v1/messages//
- AuthAPI key in header Authorization
Headers
Content-Type header must be set to the type of the media being uploaded. Supported Content- Types can be (image/jpeg, image/png, image/webp, video/mp4, video/3gpp, audio/aac, audio/mp4, audio/amr, audio/mpeg, audio/ogg; codecs=opus)
Response
200
Example response
{
"messages": [
{
"id": "<<generated id>>"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.