Media Messages
Use the messages
node to send messages containing audio, documents, images, stickers, or videos to your customers.
In essence, when you send a message that includes media, you must provide the 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
. When the request is received, the media is uploaded to the WhatsApp server and sent to the user indicated in the to_contact
field.
Send a media message
POST
https://api.qikchat.in/v1/messages
To send a media message, use the request URL and the following body parameters.
Headers
QIKCHAT-API-KEY*
string
place API key
Request Body
to_contact*
string
customer whatsapp number you want to send message
type*
string
audio | document | image | video | sticker
SPECIFIC OBJECT*
object
A successful response includes a data object
with an ID for the message sent.
The relevant object (dictionary with “id”) is nested in array which itself is in other dict.
{
"status": true,
"message": "Messages queued successfully",
"data": [
{
"id": "52JH6WmuSruAVyXvBBYemd0Ia",
"channel": "whatsapp",
"from": "919099999916",
"recipient": "+917904903575",
"created_at": "2023-02-19T12:52:25.222Z",
"status": "queued"
}
]
}
Example
The sample below shows multiple different objects such as audio
, document
, image
, sticker
, and video
for illustration purposes only. A valid request body contains only one of them.
POST /v1/messages
{
"to_contact": "whatsapp-id",
"type": "audio" | "document" | "image" | "sticker" | "video",
"audio": {
"link": "http(s)://the-url",
}
"document": {
"link": "http(s)://the-url.pdf",
"caption": "your-document-caption",
"filename": "your-document-filename"
}
"video": {
"link": "http(s)://the-url",
"caption": "your-video-caption"
}
"image": {
"link": "http(s)://the-url",
"caption": "your-image-caption"
}
"sticker": {
"link": "http(s)://the-url",
}
}
Post-Processing Media Size
audio
16 MB
document
100 MB
image
5 MB
sticker
100 KB
video
16 MB
Supported Content-Types
audio
audio/aac, audio/mp4, audio/amr, audio/mpeg, audio/ogg; codecs=opus
Note: The base audio/ogg type is not supported.
document
Any valid MIME-type.
image
image/jpeg, image/png
Images with transparent backgrounds won't support.
sticker
image/webp
video
video/mp4, video/3gpp
Notes:
Only H.264 video codec and AAC audio codec is supported. Only videos with a single audio stream are supported.
Last updated
Was this helpful?