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/{{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" }
}
]
},
{
"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" }
}
]
},
{
"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" }
}
]
},
{
"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"
}
]
}
]
}
}
}
|
Server Responses
Responce Code & Payload
Code |
Description |
200 |
Success |
400 |
Bad Request |
Sample Json Response from Server
| {
"messaging_product": "whatsapp",
"contacts": [
{
"input": "919898989898",
"wa_id": "919898989898"
}
],
"messages": [
{
"id": "wamid.HBgMOTE3ODQzMDU4NjMzFQIAERgSQkYzQUUxNjU3Mzc1Q0NCOUYxAA=="
}
]
}
|