Send Message
Send Message
The Following sample code is an example of Send Message
Send Message Request Payload
Method Type - POST
Send Message URL - https://messagingapi.charteredinfo.com/v19.0/{{Phone-Number-ID}}/messages
Request Headers
- Content-Type: application/json
- Authorization: Bearer {{Auth Key}}
{
"messaging_product" : "whatsapp" ,
"recipient_type" : "individual" ,
"to" : "919898989898" ,
"type" : "template" ,
"template" :
{
"name" : "sale_summer" ,
"language" : { "code" : "en" },
"components" : [
{
"type" : "header" ,
"parameters" : [
{
"type" : "image" ,
"image" : { "id" : "1083578506068483" , "filename" : < "imagename" > }
}
]
},
{
"type" : "body" ,
"parameters" : [
{
"type" : "text" ,
"text" : "50Off"
},
{
"type" : "text" ,
"text" : "TDS"
}
]
}
]
}
}
The Following sample code is an example of Send Media Template
Send Message Request Payload
Method Type - POST
Send Message URL - https://messagingapi.charteredinfo.com/v19.0/{{Phone-Number-ID}}/messages
Request Headers
- Content-Type: application/json
- Authorization: Bearer {{Auth Key}}
{
"messaging_product" : "whatsapp" ,
"recipient_type" : "individual" ,
"to" : "919898989898" ,
"type" : "template" ,
"template" :
{
"name" : "sale_summer" ,
"language" : { "code" : "en" },
"components" : [
{
"type" : "header" ,
"parameters" : [
{
"type" : "image" ,
"image" : { "id" : "1083578506068483" , "filename" : < "imagename" > }
}
]
},
{
"type" : "body" ,
"parameters" : [
{
"type" : "text" ,
"text" : "50Off"
},
{
"type" : "text" ,
"text" : "TDS"
}
]
}
]
}
}
Static Template
The Following sample code is an example of Send Static Template
Send Static Template Request Payload
Method Type - POST
Send Static Template URL - https://messagingapi.charteredinfo.com/v19.0/{{Phone-Number-ID}}/messages
Request Headers
- Content-Type: application/json
- Authorization: Bearer {{Auth Key}}
{
"messaging_product" : "whatsapp" ,
"recipient_type" : "individual" ,
"to" : "919898989898" ,
"type" : "template" ,
"template" : {
"name" : "renewal_message1" ,
"language" : {
"code" : "en"
}
}
}
Veriable Template
The Following sample code is an example of Send Veriable Template
Send Veriable Template Request Payload
Method Type - POST
Send Veriable Template URL - https://messagingapi.charteredinfo.com/v19.0/{{Phone-Number-ID}}/messages
Request Headers
- Content-Type: application/json
- Authorization: Bearer {{Auth Key}}
{
"messaging_product" : "whatsapp" ,
"recipient_type" : "individual" ,
"to" : "919898989898" ,
"type" : "template" ,
"template" : {
"name" : "cispl_interactive_software" ,
"language" : {
"code" : "en"
},
"components" : [
{
"type" : "body" ,
"parameters" : [
{
"type" : "text" ,
"text" : "Sonali"
}
]
}
]
}
}
The Following sample code is an example of Send Media With Veriable Template
Send Media With Veriable Template Request Payload
Method Type - POST
Send Media With Veriable Template URL - https://messagingapi.charteredinfo.com/v19.0/{{Phone-Number-ID}}/messages
Request Headers
- Content-Type: application/json
- Authorization: Bearer {{Auth Key}}
{
"messaging_product" : "whatsapp" ,
"recipient_type" : "individual" ,
"to" : "919898989898" ,
"type" : "template" ,
"template" :
{
"name" : "sale_summer" ,
"language" : { "code" : "en" },
"components" : [
{
"type" : "header" ,
"parameters" : [
{
"type" : "image" ,
"image" : { "id" : "1083578506068483" , "filename" : < "imagename" > }
}
]
},
{
"type" : "body" ,
"parameters" : [
{
"type" : "text" ,
"text" : "50Off"
},
{
"type" : "text" ,
"text" : "TDS"
}
]
}
]
}
}
Interactive Template
The Following sample code is an example of Send Interactive Template
Send Interactive Template Request Payload
Method Type - POST
Send Interactive Template URL - https://messagingapi.charteredinfo.com/v19.0/{{Phone-Number-ID}}/messages
Request Headers
- Content-Type: application/json
- Authorization: Bearer {{Auth Key}}
{
"messaging_product" : "whatsapp" ,
"recipient_type" : "individual" ,
"to" : "919898989898" ,
"type" : "interactive" ,
"interactive" : {
"type" : "list" ,
"header" : {
"type" : "text" ,
"text" : "text"
},
"body" : {
"text" : "hello"
},
"footer" : {
"text" : "FOOTER_TEXT"
},
"action" : {
"button" : "BUTTON_TEXT" ,
"sections" : [
{
"title" : "SECTION_1_TITLE" ,
"rows" : [
{
"id" : "SECTION_1_ROW_1_ID" ,
"title" : "SECTION_1_ROW_1_TITLE" ,
"description" : "SECTION_1_ROW_1_DESCRIPTION"
},
{
"id" : "SECTION_1_ROW_2_ID" ,
"title" : "SECTION_1_ROW_2_TITLE" ,
"description" : "SECTION_1_ROW_2_DESCRIPTION"
}
]
},
{
"title" : "SECTION_2_TITLE" ,
"rows" : [
{
"id" : "SECTION_2_ROW_1_ID" ,
"title" : "SECTION_2_ROW_1_TITLE" ,
"description" : "SECTION_2_ROW_1_DESCRIPTION"
},
{
"id" : "SECTION_2_ROW_2_ID" ,
"title" : "SECTION_2_ROW_2_TITLE" ,
"description" : "SECTION_2_ROW_2_DESCRIPTION"
}
]
}
]
}
}
}
{
"messaging_product" : "whatsapp" ,
"recipient_type" : "individual" ,
"to" : "919898989898" ,
"type" : "template" ,
"template" :
{
"name" : "recharge_dyanamic_url" ,
"language" : { "code" : "en" },
"components" : [
{
"type" : "button" ,
"sub_type" : "url" ,
"index" : 0 ,
"parameters" : [
{
"type" : "text" ,
"text" : "5121111"
}
]
}
]
}
}
Request Location
{
"messaging_product" : "whatsapp" ,
"recipient_type" : "individual" ,
"type" : "interactive" ,
"to" : "919898989898" ,
"interactive" : {
"type" : "location_request_message" ,
"body" : {
"text" : "Your Package is on way."
},
"action" : {
"name" : "send_location"
}
}
}
Carousel Message
{
"messaging_product" : "whatsapp" ,
"recipient_type" : "individual" ,
"to" : "919898989898" ,
"type" : "template" ,
"template" : {
"name" : "institude_course" ,
"language" : {
"code" : "en"
},
"components" : [
{
"type" : "carousel" ,
"cards" : [
{
"card_index" : 0 ,
"components" : [
{
"type" : "HEADER" ,
"parameters" : [
{
"type" : "IMAGE" ,
"image" : {
"id" : "554372573847655"
}
}
]
}
]
},
{
"card_index" : 1 ,
"components" : [
{
"type" : "HEADER" ,
"parameters" : [
{
"type" : "IMAGE" ,
"image" : {
"id" : "554372573847655"
}
}
]
}
]
},
{
"card_index" : 2 ,
"components" : [
{
"type" : "HEADER" ,
"parameters" : [
{
"type" : "IMAGE" ,
"image" : {
"id" : "554372573847655"
}
}
]
}
]
}
]
}
]
}
}
Server Responses
Responce Code & Payload
Sample Json Response from Server
{
"messaging_product" : "whatsapp" ,
"contacts" : [
{
"input" : "919898989898" ,
"wa_id" : "919898989898"
}
],
"messages" : [
{
"id" : "wamid.HBgMOTE3ODQzMDU4NjMzFQIAERgSQkYzQUUxNjU3Mzc1Q0NCOUYxAA=="
}
]
}