Send WhatsApp Text Message
Base URL
https://graph.communikate.in
Authentication
All API requests require authentication credentials. Include your API Key and API Secret in request headers to access protected endpoints.
Every API endpoint requires the following headers.
X-Api-Key
Your public API key.
X-Api-Secret
Your secret API key.
POST
/meta/wa/send/media/text/template
Request Parameters
|
to *
string
|
Recipient whatsapp number with country code but without (+ sign).
|
|
templateName *
string
|
Meta approved template name
|
|
languageCode *
string
|
The Language Code in which the template was created.
|
|
parameters (optional)
string array
|
An array of string which could substitute the variables present in the template.
|
Response
|
isSuccess
boolean
|
true: success
false: failed |
|
message
string
|
response messae from API endpoint
|
|
traceId
string?
|
a server specific tracing code by which the actual error can be reviewed
|
|
result
string?
|
if isSuccess: true then it contains WhatsApp Message Id. You should store this value in your database for checking delivery.
|
cURL Request
curl 'https://graph.communikate.in/meta/wa/send/media/text/template' \
--header 'X-Api-Key: YOUR_API_KEY' \
--header 'X-Api-Secret: YOUR_API_SECRET' \
--header 'Content-Type: application/json' \
--payload '{
"to": "9194xxxxxx13",
"templateName": "your_template_name",
"languageCode": "template_lang_code",
"parameters": [
"variable 1 value",
"variable 2 value"
]
}'
Json Response
{
"isSuccess": true,
"message": "Template Message sent and logged successfully.",
"traceId": null,
"result": "wamid.xxxxxxxxxxx"
}