5.6 KiB
5.6 KiB
MSG91 WhatsApp API Bulk Payloads
Common endpoint and header for all the payloads
- API URL:
https://api.msg91.com/api/v5/whatsapp/whatsapp-outbound-message/bulk/ - Method:
POST - Headers:
Content-Type: application/jsonauthkey: <authkey>
1. Header Configurations
Header with None
{
"integrated_number": "Your integrated Number",
"content_type": "template",
"payload": {
"messaging_product": "whatsapp",
"type": "template",
"template": {
"name": "WhatsApp Template Name",
"language": {
"code": "en",
"policy": "deterministic"
},
"namespace": null,
"to_and_components": [
{
"to": [
"<list_of_phone_numbers>"
],
"components": {}
}
]
}
}
}
Header with Text
{
"integrated_number": "Your integrated Number",
"content_type": "template",
"payload": {
"messaging_product": "whatsapp",
"type": "template",
"template": {
"name": "WhatsApp Template Name",
"language": {
"code": "en",
"policy": "deterministic"
},
"namespace": null,
"to_and_components": [
{
"to": [
"<list_of_phone_numbers with country code>"
],
"components": {}
}
]
}
}
}
Header with Image
{
"integrated_number": "Your integrated Number",
"content_type": "template",
"payload": {
"messaging_product": "whatsapp",
"type": "template",
"template": {
"name": "WhatsApp Template Name",
"language": {
"code": "en",
"policy": "deterministic"
},
"namespace": null,
"to_and_components": [
{
"to": [
"<list_of_phone_numbers with country code>"
],
"components": {
"header_1": {
"type": "image",
"value": "<url of media>"
}
}
}
]
}
}
}
Header with Video
{
"integrated_number": "Your integrated Number",
"content_type": "template",
"payload": {
"messaging_product": "whatsapp",
"type": "template",
"template": {
"name": "WhatsApp Template Name",
"language": {
"code": "en",
"policy": "deterministic"
},
"namespace": null,
"to_and_components": [
{
"to": [
"<list_of_phone_numbers with country code>"
],
"components": {
"header_1": {
"type": "video",
"value": "<url of media>"
}
}
}
]
}
}
}
Header with Document
{
"integrated_number": "Your integrated Number",
"content_type": "template",
"payload": {
"messaging_product": "whatsapp",
"type": "template",
"template": {
"name": "Template Name",
"language": {
"code": "en",
"policy": "deterministic"
},
"namespace": null,
"to_and_components": [
{
"to": [
"<list_of_phone_numbers with country code>"
],
"components": {
"header_1": {
"filename": "<filename>",
"type": "document",
"value": "<url of media>"
}
}
}
]
}
}
}
Header with Location
{
"integrated_number": "Your integrated Number",
"content_type": "template",
"payload": {
"messaging_product": "whatsapp",
"type": "template",
"template": {
"name": "Template Name",
"language": {
"code": "en",
"policy": "deterministic"
},
"namespace": null,
"to_and_components": [
{
"to": [
"<list_of_phone_numbers>"
],
"components": {
"header_1_latitude": {
"type": "location",
"value": "<latitude>"
},
"header_1_longitude": {
"type": "location",
"value": "<longitude>"
},
"header_1_name": {
"type": "location",
"value": "<name>"
},
"header_1_address": {
"type": "location",
"value": "<address>"
},
"body_1": {
"type": "text",
"value": "value1"
}
}
}
]
}
}
}
2. Button Configurations
Header with Button
- Header (Text) - Variable Body (Text) - Variable CTA button (Visit Website) - Variable or click count enabled
{
"integrated_number": "Your integrated Number",
"content_type": "template",
"payload": {
"messaging_product": "whatsapp",
"type": "template",
"template": {
"name": "Your template name",
"language": {
"code": "en",
"policy": "deterministic"
},
"namespace": null,
"to_and_components": [
{
"to": [
"<list_of_phone_numbers>"
],
"components": {
"header_1": {
"type": "text",
"value": "<{{1}}>"
},
"body_1": {
"type": "text",
"value": "value1"
},
"button_1": {
"subtype": "url",
"type": "text",
"value": "<{{url text variable}}>"
}
}
}
]
}
}
}
Note
: This file contains a partial representation of the MSG91 payloads for reference. Refer to the original documentation for Carousels, Catalogues, and Authentication templates.