WhatsApp API Hub Log in
REST API v1.0 Single API Key Meta Cloud API Drop-In Compatible

API Documentation & Integration Guide

Send WhatsApp messages, monitor delivery queues, and handle webhooks. Supports both our clean REST format and Meta WhatsApp Cloud API payloads.

Single Key Auth

Authenticate requests using only a single X-API-Key or Authorization: Bearer token. No secondary secret needed.

Dual Compatibility

Accepts both our clean flat JSON format and official Meta WhatsApp Cloud API schemas with zero payload modification.

Real-Time Webhooks

Receive automated HTTPS callbacks when messages are dispatched, delivered, or failed.

POST https://api.fworld.site/api/send.php
Content-Type: application/json

Authentication Headers

# Pass your API Key in either the X-API-Key header or Bearer Token (Meta style):
X-API-Key: wa_live_YOUR_API_KEY_HERE
# Or:
Authorization: Bearer wa_live_YOUR_API_KEY_HERE
Content-Type: application/json

Request Body (Supported Formats)

Format A: Flat Text JSON Text
{
  "to": "919876543210",
  "message": "Hello World! ๐Ÿš€",
  "humanize": true
}
Format B: Meta Cloud API Media Drop-In
{
  "messaging_product": "whatsapp",
  "to": "919876543210",
  "type": "document",
  "document": {
    "link": "https://example.com/invoice.pdf",
    "caption": "Your monthly invoice",
    "filename": "invoice.pdf"
  }
}
Format C: Direct Media / URL Media
{
  "to": "919876543210",
  "type": "image",
  "media_url": "https://example.com/photo.jpg",
  "caption": "Photo from API! ๐Ÿ“ธ"
}
Field Type Required Description
to string Required Recipient's phone number with country code (e.g. 919876543210) or 10-digit Indian number.
message / caption string Conditional The message text or media caption. Optional if a media file/URL is provided. Supports WhatsApp formatting (*bold*, _italic_).
media_url or link string (URL) Optional Direct HTTP/HTTPS link to an image, PDF, document, audio, or video file. Downloaded securely with SSRF protection.
type string Optional image, document, video, or audio. Auto-detected from file extension if omitted.
file / attachment binary file Optional Local binary file uploaded via multipart/form-data (curl -F "file=@invoice.pdf"). Up to 20MB.
humanize boolean Optional Defaults to true. Adds micro-delays between messages to simulate human typing and prevent spam bans.
campaign_id integer Optional Optional campaign ID to group analytics and delivery metrics in your dashboard.

Code Examples (Dual-Compatible)

Copy-paste ready snippets in multiple programming languages.

cURL โ€” Standard Clean Format
curl -X POST "https://api.fworld.site/api/send.php" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY_HERE" \
  -d '{
    "to": "919876543210",
    "message": "Hello from WhatsApp API Hub! ๐Ÿš€",
    "humanize": true
  }'
cURL โ€” Meta WhatsApp Cloud API Format (Drop-In)
curl -X POST "https://api.fworld.site/api/send.php" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY_HERE" \
  -d '{
    "messaging_product": "whatsapp",
    "recipient_type": "individual",
    "to": "919876543210",
    "type": "text",
    "text": {
      "preview_url": false,
      "body": "Hello via Meta Cloud API format! ๐ŸŒ"
    }
  }'
cURL โ€” Send Media via Public URL (Images, PDFs, Videos, Audio) New Feature
curl -X POST "https://api.fworld.site/api/send.php" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY_HERE" \
  -d '{
    "to": "919876543210",
    "type": "image",
    "media_url": "https://example.com/invoice-1024.jpg",
    "caption": "Your payment receipt has been verified! ๐Ÿงพ"
  }'
cURL โ€” Direct File Upload from Terminal (Multipart/form-data) Binary File
curl -X POST "https://api.fworld.site/api/send.php" \
  -H "X-API-Key: YOUR_API_KEY_HERE" \
  -F "to=919876543210" \
  -F "file=@/path/to/annual_report.pdf" \
  -F "caption=Attached is the annual financial statement."
Python (requests)
import requests

url = "https://api.fworld.site/api/send.php"
headers = {
    "Content-Type": "application/json",
    "X-API-Key": "YOUR_API_KEY_HERE"
}
payload = {
    "to": "919876543210",
    "message": "Hello from Python! ๐Ÿ",
    "humanize": True
}

response = requests.post(url, json=payload, headers=headers, timeout=15)
print(response.json())
JavaScript / Node.js (fetch)
const response = await fetch("https://api.fworld.site/api/send.php", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-API-Key": "YOUR_API_KEY_HERE"
  },
  body: JSON.stringify({
    to: "919876543210",
    message: "Order confirmed via Node.js! โšก",
    humanize: true
  })
});

const data = await response.json();
console.log(data);
PHP (cURL)
$payload = [
    'to' => '919876543210',
    'message' => 'Hello from PHP Client! ๐Ÿ˜',
    'humanize' => true
];

$ch = curl_init("https://api.fworld.site/api/send.php");
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
        'X-API-Key: YOUR_API_KEY_HERE'
    ],
    CURLOPT_POSTFIELDS => json_encode($payload)
]);

$response = curl_exec($ch);
curl_close($ch);
echo $response;
Go (net/http)
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io"
	"net/http"
)

func main() {
	payload, _ := json.Marshal(map[string]interface{}{
		"to":       "919876543210",
		"message":  "Instant alert via Go! ๐Ÿน",
		"humanize": true,
	})

	req, _ := http.NewRequest("POST", "https://api.fworld.site/api/send.php", bytes.NewBuffer(payload))
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("X-API-Key", "YOUR_API_KEY_HERE")

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}

Success Response (HTTP 200 OK)

{
  "ok": true,
  "status": "queued",
  "message_id": 142,
  "request_id": "req_671e8845f7b67",
  "recipient": "919876543210",
  "messaging_product": "whatsapp",
  "contacts": [
    {
      "input": "919876543210",
      "wa_id": "919876543210"
    }
  ],
  "messages": [
    {
      "id": "wamid.2bad39f34245353e31eeeec923ce4aa5",
      "message_status": "accepted"
    }
  ]
}

The message is buffered into the queue with both standard fields and Meta Cloud API fields for universal SDK compatibility.

Error Response (HTTP 400 / 401 / 429)

{
  "ok": false,
  "error": "Invalid API key or access token.",
  "meta_error": {
    "message": "Invalid OAuth access token or API key.",
    "type": "OAuthException",
    "code": 190
  }
}

Returns standard error message along with structured Meta exception for third-party libraries.

Webhooks & Real-Time Delivery Notifications

Configure your HTTPS webhook URL in the Dashboard under Webhooks to receive live delivery status updates.

When a message is sent or changes status, our background worker immediately performs an HTTP POST request to your webhook endpoint:

{
  "event": "message.delivered",
  "message_id": 142,
  "to": "919876543210",
  "status": "sent",
  "timestamp": "2026-10-13T14:45:00Z"
}
5 Languages

Multi-Language Quickstart Programs Included

Ready-to-run source code projects in your favorite language are available in the quickstart/ folder:

๐Ÿ Python

Zero-dep CLI & library

python send.py
โšก Node.js

Native fetch (Node 18+)

node send.js
๐Ÿ˜ PHP

OOP Client & cURL

php send.php
๐Ÿน Go

Native net/http CLI

go run main.go
โ˜• Java

Java 8 to 21+ compatible

java SendWhatsApp.java
CLI Tool Included Interactive Terminal

Send Messages Directly from Terminal

Use our interactive Python program to send messages by prompting for phone number and text directly in PowerShell or Terminal.

python send_whatsapp.py

Author & Legal Notice

Developed by Navneet Kumar Yadav. This project is an independent, community-driven open-source automation library and is not affiliated with, sponsored by, or endorsed by Meta Platforms, Inc. or WhatsApp Inc.

For any copyright, removal, or takedown requests, contact: info.assistgroupofficial@gmail.com.