Media Message
To send a text message, make POST
it to /{{Channel-ID}}/messages
and attach a message media object, Whatsapp Business API supports media type as in the list below:
Audio Type
Document Type
Image Type
Sticker Type
Video Type
A successful response includes an object with an identifier prefixed with wamid
. Use the wamid
to track your message status.
To know what media type you can send, please see this media type supported
Image Message Payload Sample
{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "{{Recipient-Phone-Number}}",
"type": "image",
"image": {
"id": "Image ID from uploaded media in Media API",
"link": "Use this field if you want to use media from your media storage"
"caption":"Add caption to your image"
}
}
Document Message Payload Sample
{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "{{Recipient-Phone-Number}}",
"type": "document",
"document": {
"id": "Document ID from uploaded media in Media API",
"link": "Use this field if you want to use media from your media storage"
"caption":"Add caption to your document"
}
}
Audio Message Payload Sample
{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "{{Recipient-Phone-Number}}",
"type": "audio",
"audio": {
"id": "Audio ID from uploaded media in Media API",
"link": "Use this field if you want to use media from your media storage"
}
}
Sticker Message Payload Sample
{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "{{Recipient-Phone-Number}}",
"type": "sticker",
"sticker": {
"id": "Sticker ID from uploaded media in Media API",
"link": "Use this field if you want to use media from your media storage"
}
}
Video Message Payload Sample
{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "{{Recipient-Phone-Number}}",
"type": "video",
"video": {
"id": "Video ID from uploaded media in Media API",
"link": "Use this field if you want to use media from your media storage"
"caption":"Add caption to your video"
}
}
Last updated