Personalize Your Documentation

Log In to your account to view your live API credentials (API Key, Phone ID, WABA ID) and see copy-pasteable code examples pre-filled with your key.

Authentication
Every API request requires validation using your unique API Key. You must pass this key inside the body parameters of your JSON requests.
Security Tip: Never disclose this API key in public repos or client-side Javascript code.
Unified Endpoint
All message sending requests (both Text and Templates) are handled securely through our unified endpoint:
POST https://shambhu.co.in.demodesk.co.in/api/send_whatsapp_message.php
Send Text Message
Send custom plain-text messages. Note that sending text messages requires an active customer customer-care window (i.e. within 24 hours of the user's last message to you).
Request Body Parameters
ParameterTypeRequirementDescription
api_key String Required Your developer dashboard API Key.
phone_number String Required Recipient mobile number in full E.164 country code format (e.g. 919876543210). Do not include + or symbols.
type String Required Must be set to text.
message String Required The message text content to send. Supports line-breaks (\n) and emojis.
curl -X POST https://shambhu.co.in.demodesk.co.in/api/send_whatsapp_message.php \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "YOUR_API_KEY_XXXXXXXX",
    "phone_number": "919876543210",
    "type": "text",
    "message": "Hello from Shambhu WhatsApp Business API!"
  }'
<?php
$curl = curl_init();
curl_setopt_array($curl, [
  CURLOPT_URL => "https://shambhu.co.in.demodesk.co.in/api/send_whatsapp_message.php",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_POST => true,
  CURLOPT_POSTFIELDS => json_encode([
    "api_key" => "YOUR_API_KEY_XXXXXXXX",
    "phone_number": "919876543210",
    "type": "text",
    "message": "Hello from Shambhu WhatsApp Business API!"
  ]),
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json"
  ],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
const fetch = require('node-fetch');

fetch('https://shambhu.co.in.demodesk.co.in/api/send_whatsapp_message.php', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    api_key: 'YOUR_API_KEY_XXXXXXXX',
    phone_number: '919876543210',
    type: 'text',
    message: 'Hello from Shambhu WhatsApp Business API!'
  })
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
import requests

url = "https://shambhu.co.in.demodesk.co.in/api/send_whatsapp_message.php"
payload = {
    "api_key": "YOUR_API_KEY_XXXXXXXX",
    "phone_number": "919876543210",
    "type": "text",
    "message": "Hello from Shambhu WhatsApp Business API!"
}
response = requests.post(url, json=payload)
print(response.json())
Send Template (Simple Positional Array)
This is the easiest and most common way to send a Meta-approved template. You simply provide an ordered array of strings containing your variables (e.g. {{1}}, {{2}}) inside the payload field.
Request Body Parameters
ParameterTypeRequirementDescription
api_key String Required Your developer dashboard API Key.
phone_number String Required Recipient mobile number in full E.164 format.
type String Required Must be set to template.
template_name String Required Name of the approved WhatsApp template (e.g. otp_verification).
language String Optional Language code of the template. Defaults to en_US.
payload Array Required Array of text values corresponding to positional parameters (e.g. ["123456"] to replace {{1}}).
curl -X POST https://shambhu.co.in.demodesk.co.in/api/send_whatsapp_message.php \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "YOUR_API_KEY_XXXXXXXX",
    "phone_number": "919876543210",
    "type": "template",
    "template_name": "otp_verification",
    "language": "en_US",
    "payload": ["558831"]
  }'
<?php
$curl = curl_init();
curl_setopt_array($curl, [
  CURLOPT_URL => "https://shambhu.co.in.demodesk.co.in/api/send_whatsapp_message.php",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_POST => true,
  CURLOPT_POSTFIELDS => json_encode([
    "api_key" => "YOUR_API_KEY_XXXXXXXX",
    "phone_number" => "919876543210",
    "type" => "template",
    "template_name" => "otp_verification",
    "language" => "en_US",
    "payload" => ["558831"]
  ]),
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json"
  ],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
const fetch = require('node-fetch');

fetch('https://shambhu.co.in.demodesk.co.in/api/send_whatsapp_message.php', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    api_key: 'YOUR_API_KEY_XXXXXXXX',
    phone_number: '919876543210',
    type: 'template',
    template_name: 'otp_verification',
    language: 'en_US',
    payload: ['558831']
  })
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
import requests

url = "https://shambhu.co.in.demodesk.co.in/api/send_whatsapp_message.php"
payload = {
    "api_key": "YOUR_API_KEY_XXXXXXXX",
    "phone_number": "919876543210",
    "type": "template",
    "template_name": "otp_verification",
    "language": "en_US",
    "payload": ["558831"]
}
response = requests.post(url, json=payload)
print(response.json())
Send Template (Structured Components)
For complex requirements such as sending dynamic media headers (images, documents, videos) or interactive buttons with variables, use the Meta-native components format. This structure matches the standard Meta Cloud API parameters.
Request Body Parameters
ParameterTypeRequirementDescription
api_key String Required Your developer dashboard API Key.
phone_number String Required Recipient mobile number in full E.164 format.
type String Required Must be set to template.
template_name String Required Name of the approved WhatsApp template.
language String Optional Language code of the template. Defaults to en_US.
components Array Required Fully structured components array mapping variables to Meta headers, bodies, or buttons.
curl -X POST https://shambhu.co.in.demodesk.co.in/api/send_whatsapp_message.php \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "YOUR_API_KEY_XXXXXXXX",
    "phone_number": "919876543210",
    "type": "template",
    "template_name": "otp_verification",
    "language": "en_US",
    "components": [
      {
        "type": "body",
        "parameters": [
          {
            "type": "text",
            "text": "558831"
          }
        ]
      }
    ]
  }'
<?php
$curl = curl_init();
curl_setopt_array($curl, [
  CURLOPT_URL => "https://shambhu.co.in.demodesk.co.in/api/send_whatsapp_message.php",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_POST => true,
  CURLOPT_POSTFIELDS => json_encode([
    "api_key" => "YOUR_API_KEY_XXXXXXXX",
    "phone_number" => "919876543210",
    "type" => "template",
    "template_name" => "otp_verification",
    "language" => "en_US",
    "components" => [
      [
        "type" => "body",
        "parameters" => [
          [
            "type" => "text",
            "text": "558831"
          ]
        ]
      ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json"
  ],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
const fetch = require('node-fetch');

fetch('https://shambhu.co.in.demodesk.co.in/api/send_whatsapp_message.php', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    api_key: 'YOUR_API_KEY_XXXXXXXX',
    phone_number: '919876543210',
    type: 'template',
    template_name: 'otp_verification',
    language: 'en_US',
    components: [
      {
        type: 'body',
        parameters: [
          {
            type: 'text',
            text: '558831'
          }
        ]
      }
    ]
  })
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
import requests

url = "https://shambhu.co.in.demodesk.co.in/api/send_whatsapp_message.php"
payload = {
    "api_key": "YOUR_API_KEY_XXXXXXXX",
    "phone_number": "919876543210",
    "type": "template",
    "template_name": "otp_verification",
    "language": "en_US",
    "components": [
        {
            "type": "body",
            "parameters": [
                {
                    "type": "text",
                    "text": "558831"
                }
            ]
        }
    ]
}
response = requests.post(url, json=payload)
print(response.json())
Webhooks Setup
Our platform can push real-time status updates (sent, delivered, read, failed) and incoming customer replies directly to your server. Configure your Callback URL and Verify Token in the API Console.
Sample Incoming Webhook JSON Payload
Incoming JSON Structure
{
  "object": "whatsapp_business_account",
  "entry": [
    {
      "changes": [
        {
          "field": "messages",
          "value": {
            "messaging_product": "whatsapp",
            "metadata": {
              "display_phone_number": "15550000000",
              "phone_number_id": "YOUR_PHONE_NUMBER_ID"
            },
            "contacts": [
              {
                "profile": {
                  "name": "John Doe"
                },
                "wa_id": "919876543210"
              }
            ],
            "messages": [
              {
                "from": "919876543210",
                "id": "wamid.HBgLOTE5ODc2NTQzMjEwFQIAERgSQjE4MkYzOUY0OTc4RDVCOTEwAA==",
                "timestamp": "1721553535",
                "text": {
                  "body": "Hello! I have a query about my order."
                },
                "type": "text"
              }
            ]
          }
        }
      ]
    }
  ]
}