Authentication
Authenticate your requests by including your unique API Key in the request header.
Keep this key secret and never share it in client-side code.
Header
Authorization: Bearer YOUR_API_KEY_XXXXXXXX
Base URL
All API requests should be made to this base endpoint:
https://gd.kharidi.in/api
Send Text Message
Send a simple text message. (Note: Only works within the 24-hour window).
POST /send-message
ParameterTypeDescription
phone REQ String Recipient mobile (e.g., 919876543210).
type REQ String Must be text.
message REQ String Message content.
PHP (cURL)
$curl = curl_init();
curl_setopt_array($curl, [
  CURLOPT_URL => "https://gd.kharidi.in/api/send-message",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_POST => true,
  CURLOPT_POSTFIELDS => json_encode([
    "phone" => "919999999999",
    "type" => "text",
    "message" => "Hello form Shambhu API!"
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer YOUR_API_KEY_XXXXXXXX",
    "Content-Type: application/json"
  ],
]);
$response = curl_exec($curl);
curl_close($curl);
Send Media Message
Send Images, Videos, or Documents via a direct public URL.
POST /send-media
ParameterTypeDescription
phone REQ String Recipient mobile.
type REQ String image, video, or document.
url REQ String Direct public URL of file.
caption OPT String Text caption (images/videos).
JSON Payload
{
  "phone": "919999999999",
  "type": "image",
  "url": "https://example.com/image.jpg",
  "caption": "Product Image"
}
Send Template Message
Required to initiate conversations. Use variables (e.g. {{1}}) for dynamic content.
POST /send-template
PHP Example
$data = [
    "phone" => "919999999999",
    "template_name" => "otp_verification",
    "language" => "en_US",
    "components" => [
        [
            "type" => "body",
            "parameters" => [
                [ "type" => "text", "text" => "123456" ]
            ]
        ]
    ]
];
// ... Send Request ...
Webhooks
Configure your callback URL in the dashboard to receive real-time updates.
Incoming JSON
{
  "object": "whatsapp_business_account",
  "entry": [
    {
      "changes": [
        {
          "field": "messages",
          "value": {
            "messages": [
              {
                "from": "919999999999",
                "text": { "body": "Hello!" },
                "type": "text"
              }
            ]
          }
        }
      ]
    }
  ]
}