API Docs

Below is the documentation for the WhaZap WhatsApp API endpoints.

1. POST /api/v1/send

Sends a WhatsApp message (text, media, location, or contact). One (1) credit is deducted on success.

Parameter Type Required? Description
phone string Yes* Recipient’s WhatsApp number in full international format. E.g. "91987654321"
message string Required if no other type The text message content.
mediaType string No Type of media (e.g. "image", "video", etc.).
mediaUrl string Required if mediaType used Publicly accessible URL/path to the file.
caption string No Caption for images or videos.
mimetype string No E.g. "image/jpeg".
fileName string No File name for documents.
location object Required if sending location only Example: {"latitude":12.345,"longitude":67.890,"name":"X","address":"Y"}
contact object Required if sending contact only Example: {"fullName":"John Doe","phoneNumber":"1234567890"}

* At least one of message, mediaUrl, location, or contact must be present.

curl -X POST "https://whazap.co/api/v1/send" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "91987654321",
    "message": "Hello, this is a test message!"
  }'
<?php
$apiUrl = "https://whazap.co/api/v1/send";
$apiKey = "YOUR_API_KEY";

$data = [
    "phone" => "91987654321",
    "message" => "Hello, this is a test message!"
];

$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer $apiKey",
    "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
import requests
import json

api_url = "https://whazap.co/api/v1/send"
api_key = "YOUR_API_KEY"

payload = {
    "phone": "91987654321",
    "message": "Hello, this is a test from Python!"
}

headers = {
    "Authorization": f"Bearer {api_key}",
    "Content-Type": "application/json"
}

response = requests.post(api_url, headers=headers, data=json.dumps(payload))
print(response.json())
const fetch = require('node-fetch');

const apiUrl = 'https://whazap.co/api/v1/send';
const apiKey = 'YOUR_API_KEY';

const payload = {
  phone: '91987654321',
  message: 'Hello, this is a test from Node!'
};

fetch(apiUrl, {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${apiKey}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(payload)
})
  .then(res => res.json())
  .then(data => console.log(data))
  .catch(err => console.error(err));
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

public class Program
{
    public static async Task Main()
    {
        var apiUrl = "https://whazap.co/api/v1/send";
        var apiKey = "YOUR_API_KEY";

        var payload = new {
            phone = "91987654321",
            message = "Hello, this is a test from C#!"
        };

        using (var client = new HttpClient())
        {
            client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiKey}");
            var json = JsonConvert.SerializeObject(payload);
            var content = new StringContent(json, Encoding.UTF8, "application/json");

            var response = await client.PostAsync(apiUrl, content);
            var responseString = await response.Content.ReadAsStringAsync();
            Console.WriteLine(responseString);
        }
    }
}

2. POST /api/v1/isRegistered

Checks if a phone number is registered on WhatsApp.

Parameter Type Required? Description
phone string Yes The phone number to check on WhatsApp. E.g. "1234567890"
curl -X POST "https://whazap.co/api/v1/isRegistered" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "1234567890"
  }'
<?php
$apiUrl = "https://whazap.co/api/v1/isRegistered";
$apiKey = "YOUR_API_KEY";

$data = [
    "phone" => "1234567890"
];

$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer $apiKey",
    "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
import requests
import json

api_url = "https://whazap.co/api/v1/isRegistered"
api_key = "YOUR_API_KEY"

payload = {
    "phone": "1234567890"
}

headers = {
    "Authorization": f"Bearer {api_key}",
    "Content-Type": "application/json"
}

response = requests.post(api_url, headers=headers, data=json.dumps(payload))
print(response.json())
const fetch = require('node-fetch');

const apiUrl = 'https://whazap.co/api/v1/isRegistered';
const apiKey = 'YOUR_API_KEY';

const payload = {
  phone: '1234567890'
};

fetch(apiUrl, {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${apiKey}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(payload)
})
  .then(res => res.json())
  .then(data => console.log(data))
  .catch(err => console.error(err));
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

public class Program
{
    public static async Task Main()
    {
        var apiUrl = "https://whazap.co/api/v1/isRegistered";
        var apiKey = "YOUR_API_KEY";

        var payload = new {
            phone = "1234567890"
        };

        using (var client = new HttpClient())
        {
            client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiKey}");
            var json = JsonConvert.SerializeObject(payload);
            var content = new StringContent(json, Encoding.UTF8, "application/json");

            var response = await client.PostAsync(apiUrl, content);
            var responseString = await response.Content.ReadAsStringAsync();
            Console.WriteLine(responseString);
        }
    }
}

3. POST /api/v1/checkwallet

Returns the authenticated user’s current wallet balance. No body params required.

Simply send a POST request with the Authorization header.

curl -X POST "https://whazap.co/api/v1/checkwallet" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
<?php
$apiUrl = "https://whazap.co/api/v1/checkwallet";
$apiKey = "YOUR_API_KEY";

$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer $apiKey",
    "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
import requests

api_url = "https://whazap.co/api/v1/checkwallet"
api_key = "YOUR_API_KEY"

headers = {
    "Authorization": f"Bearer {api_key}",
    "Content-Type": "application/json"
}

response = requests.post(api_url, headers=headers)
print(response.json())
const fetch = require('node-fetch');

const apiUrl = 'https://whazap.co/api/v1/checkwallet';
const apiKey = 'YOUR_API_KEY';

fetch(apiUrl, {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${apiKey}`,
    'Content-Type': 'application/json'
  }
})
  .then(res => res.json())
  .then(data => console.log(data))
  .catch(err => console.error(err));
using System;
using System.Net.Http;
using System.Threading.Tasks;

public class Program
{
    public static async Task Main()
    {
        var apiUrl = "https://whazap.co/api/v1/checkwallet";
        var apiKey = "YOUR_API_KEY";

        using (var client = new HttpClient())
        {
            client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiKey}");
            var response = await client.PostAsync(apiUrl, null);
            var responseString = await response.Content.ReadAsStringAsync();
            Console.WriteLine(responseString);
        }
    }
}

4. POST /api/v1/checkdelivery

A placeholder endpoint (currently not implemented). Could be used to check message delivery status.

No specific parameters are required here in the default implementation.

curl -X POST "https://whazap.co/api/v1/checkdelivery" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
<?php
$apiUrl = "https://whazap.co/api/v1/checkdelivery";
$apiKey = "YOUR_API_KEY";

$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer $apiKey",
    "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
import requests
import json

api_url = "https://whazap.co/api/v1/checkdelivery"
api_key = "YOUR_API_KEY"

headers = {
    "Authorization": f"Bearer {api_key}",
    "Content-Type": "application/json"
}

payload = {}

response = requests.post(api_url, headers=headers, data=json.dumps(payload))
print(response.json())
const fetch = require('node-fetch');

const apiUrl = 'https://whazap.co/api/v1/checkdelivery';
const apiKey = 'YOUR_API_KEY';

fetch(apiUrl, {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${apiKey}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({})
})
  .then(res => res.json())
  .then(data => console.log(data))
  .catch(err => console.error(err));
using System;
using System.Net.Http;
using System.Threading.Tasks;

public class Program
{
    public static async Task Main()
    {
        var apiUrl = "https://whazap.co/api/v1/checkdelivery";
        var apiKey = "YOUR_API_KEY";

        using (var client = new HttpClient())
        {
            client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiKey}");
            var response = await client.PostAsync(apiUrl, new StringContent("{}"));
            var responseString = await response.Content.ReadAsStringAsync();
            Console.WriteLine(responseString);
        }
    }
}