Send Message
Media |
Supported File Type(s) |
Size Limit |
audio |
- audio/aac - audio/mp4 - audio/mpeg - audio/amr - audio/ogg Note: only opus codecs, base audio/ogg is not supported |
16MB |
document |
- text/plain - application/pdf - application/vnd.ms-powerpoint - application/msword - application/vnd.ms-excel - application/vnd.openxmlformats-officedocument.wordprocessingml.document - application/vnd.openxmlformats-officedocument.presentationml.presentation - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
100MB |
image |
- image/jpeg - image/png |
5MB |
sticker |
- image/webp |
100KB |
video |
- video/mp4 - video/3sp Notes: - Only H.264 video codec and AAC audio codec is supported. - We support videos with a single audio stream or no audio stream. |
16MB |
text |
static Messages |
|
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
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=="
}
]
}
|