Enterprise WhatsApp Automation Platform
Developers

Simple HTTP API

Send WhatsApp messages using a clean REST API. Full documentation below.

Authentication

Every API request requires your API key. Send it either as a query parameter api_key or as header X-API-Key.

# Header (recommended)
X-API-Key: your_api_key_here

# Or query string
?api_key=your_api_key_here

Find your API key in Dashboard → API.

Send Message

POST /api/send.php

ParameterRequiredDescription
mobileYesRecipient number (e.g., 923001234567)
messageYesText message content
typeNo0=Text (default), 1=Image, 2=Document, 3=Voice, 4=Video
urlNoMedia URL (required for type 1–4)
captionNoCaption for images / videos
priorityNo0=highest, 10=normal, 20=low (default 10)
instance_idNoSpecific instance to send from (auto-picked if omitted)
campaign_typeNotransactional (default) or promotional
scheduleNo1 to schedule for later, 0 immediate
schedule_timeNoDate-time string (YYYY-MM-DD HH:MM:SS)
request.sh
curl -X POST "https://pulse.kaaffoods.com/api/send.php" \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mobile":"923001234567","message":"Hello from KaafPulse"}'
response.json
{
  "success": true,
  "message_id": 1234,
  "totalgsm": "1",
  "remaincredit": "9999",
  "instance_id": 5
}

Media Messages

Send images, documents, voice notes or video by setting type and providing a public url.

image.sh
curl -X POST "https://pulse.kaaffoods.com/api/send.php" \
  -H "X-API-Key: YOUR_KEY" \
  -d "mobile=923001234567" \
  -d "type=1" \
  -d "url=https://example.com/image.jpg" \
  -d "caption=Check this out!"

Bulk / Personalized

Send different messages to different numbers in one request by using personalized=1 and passing a JSON array as message.

personalized.sh
curl -X POST "https://pulse.kaaffoods.com/api/send.php" \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "personalized": "1",
    "message": [
      {"mobile": "923001111111", "message": "Hi Ali!"},
      {"mobile": "923002222222", "message": "Hi Sara!"}
    ]
  }'

Number Check

POST /api/number.php

Verify if numbers exist on WhatsApp before sending. Prevents wasted pulses.

curl -X POST "https://pulse.kaaffoods.com/api/number.php" \
  -H "X-API-Key: YOUR_KEY" \
  -d "numbers=923001234567,923002345678"

Response Codes

CodeMeaning
200Success — message queued
400Bad request — missing or invalid params
401Unauthorized — invalid API key
402Insufficient pulses
409No READY instance available
500Server error
502Engine unavailable

Webhooks

Set your webhook URL in Dashboard → Settings to receive incoming messages and delivery reports in real time.

Your endpoint will receive POST requests with JSON payloads like:

incoming.json
{
  "event": "inbox",
  "instance_id": 5,
  "from": "923001234567",
  "body": "Hello!"
}

Code Examples

<?php
$ch = curl_init('https://pulse.kaaffoods.com/api/send.php');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => [
        'mobile' => '923001234567',
        'message' => 'Hello from PHP!',
    ],
    CURLOPT_HTTPHEADER => ['X-API-Key: YOUR_KEY'],
    CURLOPT_RETURNTRANSFER => true,
]);
$res = curl_exec($ch);
echo $res;
const res = await fetch('https://pulse.kaaffoods.com/api/send.php', {
    method: 'POST',
    headers: { 'X-API-Key': 'YOUR_KEY' },
    body: new URLSearchParams({
        mobile: '923001234567',
        message: 'Hello from Node!'
    })
});
console.log(await res.json());
import requests

r = requests.post(
    "https://pulse.kaaffoods.com/api/send.php",
    headers={"X-API-Key": "YOUR_KEY"},
    data={"mobile": "923001234567", "message": "Hello from Python!"}
)
print(r.json())
curl -X POST "https://pulse.kaaffoods.com/api/send.php" \
  -H "X-API-Key: YOUR_KEY" \
  -d "mobile=923001234567" \
  -d "message=Hello World!"