curl --request POST \
--url https://tawked.com/v1/whatsapp/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "<string>",
"template": "<string>",
"lang": "<string>",
"params": {},
"header": {},
"buttons": "<array>",
"reference": "<string>",
"application": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
to: '<string>',
template: '<string>',
lang: '<string>',
params: {},
header: {},
buttons: '<array>',
reference: '<string>',
application: '<string>'
})
};
fetch('https://tawked.com/v1/whatsapp/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tawked.com/v1/whatsapp/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'to' => '<string>',
'template' => '<string>',
'lang' => '<string>',
'params' => [
],
'header' => [
],
'buttons' => '<array>',
'reference' => '<string>',
'application' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://tawked.com/v1/whatsapp/messages"
payload = {
"to": "<string>",
"template": "<string>",
"lang": "<string>",
"params": {},
"header": {},
"buttons": "<array>",
"reference": "<string>",
"application": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "0f4c9c0e-6d2b-4b8a-9c3e-7a1d2e3f4a5b",
"status": "accepted",
"to": "+966550000000",
"template": "order_received_v1",
"lang": "ar",
"reference": "order-1042",
"price_halalas": 0,
"created_at": "2026-09-06T12:00:00+03:00"
}{
"error": "service_required"
}{
"error": "unauthorized"
}{
"error": "insufficient_credits",
"message": "Insufficient credits",
"balance_halalas": 0,
"price_halalas": 9
}{
"error": "account_not_active"
}{
"error": "service_not_found"
}{
"error": "no_whatsapp_number"
}{
"error": "unknown_template"
}{
"error": "too_many_requests"
}{
"error": "internal_error"
}{
"error": "send_failed"
}{
"error": "templates_unavailable"
}Send a template message
Sends an approved template to a Saudi mobile through the number attached to the application, and answers 202 with an id to track it. The fee, if any, is for the send; a failed send refunds it.
curl --request POST \
--url https://tawked.com/v1/whatsapp/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "<string>",
"template": "<string>",
"lang": "<string>",
"params": {},
"header": {},
"buttons": "<array>",
"reference": "<string>",
"application": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
to: '<string>',
template: '<string>',
lang: '<string>',
params: {},
header: {},
buttons: '<array>',
reference: '<string>',
application: '<string>'
})
};
fetch('https://tawked.com/v1/whatsapp/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tawked.com/v1/whatsapp/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'to' => '<string>',
'template' => '<string>',
'lang' => '<string>',
'params' => [
],
'header' => [
],
'buttons' => '<array>',
'reference' => '<string>',
'application' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://tawked.com/v1/whatsapp/messages"
payload = {
"to": "<string>",
"template": "<string>",
"lang": "<string>",
"params": {},
"header": {},
"buttons": "<array>",
"reference": "<string>",
"application": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "0f4c9c0e-6d2b-4b8a-9c3e-7a1d2e3f4a5b",
"status": "accepted",
"to": "+966550000000",
"template": "order_received_v1",
"lang": "ar",
"reference": "order-1042",
"price_halalas": 0,
"created_at": "2026-09-06T12:00:00+03:00"
}{
"error": "service_required"
}{
"error": "unauthorized"
}{
"error": "insufficient_credits",
"message": "Insufficient credits",
"balance_halalas": 0,
"price_halalas": 9
}{
"error": "account_not_active"
}{
"error": "service_not_found"
}{
"error": "no_whatsapp_number"
}{
"error": "unknown_template"
}{
"error": "too_many_requests"
}{
"error": "internal_error"
}{
"error": "send_failed"
}{
"error": "templates_unavailable"
}Authorizations
Authorization: Bearer
Headers
A 1 to 128 printable-ASCII-character key you generate, scoped to your API key. Replaying the same key returns the original 202 response unchanged, with the response header Idempotent-Replayed: true: nothing is sent or charged again. A send that fails with 502 releases the key. Use one key per business event (order-1042-received) and retry a 502 or a network error with the same key.
Body
The destination: a Saudi mobile in any of the accepted formats, stored as E.164.
The template name exactly as WhatsApp Manager lists it, 1 to 512 characters. It must be approved on the number's WhatsApp Business Account; authentication templates are refused (one-time codes go through Verify).
The template language as Meta lists it (ar, en, en_US). Required when the template exists in more than one language.
Placeholder values for the body: the keys are the placeholder names of a named template ({{name}}), or "1", "2" for a positional one ({{1}}). Every placeholder is required, extra keys are refused, values are strings of 1 to 1024 characters. GET /v1/whatsapp/templates lists the placeholders of each template.
{ "text": "…" }: the value of the text header's placeholder. Required when the template has one, refused otherwise; no newlines. Media headers are not supported yet.
[{ "index": 0, "parameter": "…" }]: the dynamic suffix of each URL button, one entry per button that has a placeholder; index is the button's position among the template's buttons.
Your own reference (order id, event id), 1 to 64 printable characters. Echoed back, and searchable in the Messages log of the console.
Partner keys only: which of your provisioned applications is sending, as on start.