WhatsApp API Documentation

A powerful API for WhatsApp message automation with user management and security features.

Features

User Management

  • Registration with just one user
  • Phone number verification
  • 50 free messages for new users
  • The minimum number of messages you can purchase is 100 verification messages.

Authentication

  • Login system
  • API key validation
  • Account verification
  • Secure session handling

Messaging System

  • Rate limiting (1 msg/minute)
  • Multi-language templates
  • Message history tracking
  • No credit card required

Authentication

The API uses API key authentication. To obtain an API key:

  1. Register a new user account
  2. Login with your credentials
  3. Verify your account with the received WhatsApp code
  4. Use API key in which found in your dashboard
Include your API key in the x-api-key header for authenticated requests.

Endpoints

Base URL

https://wh.invnty.com/api
GET /dashboard

Retrieve user dashboard information.

POST /send-message

Send WhatsApp message.

{
    "phoneNumber": "string",    Ex: +96478xxxxxxxx
    "code": "string",           Ex: 218182
    "language": "string"        EX: ar or en
}

Code Examples

import requests

BASE_URL = 'https://wh.invnty.com/api'

# Example usage:
def get_dashboard(api_key):
    """Get user dashboard information."""
    headers = {'x-api-key': api_key}
    response = requests.get(f'{BASE_URL}/dashboard', headers=headers)
    return response.json()

def send_message(api_key, phone_number, code, language='ar'):
    """Send OTP message."""
    headers = {'x-api-key': api_key}
    response = requests.post(f'{BASE_URL}/send-message', 
        headers=headers,
        json={
            'phoneNumber': phone_number,
            'code': code,
            'language': language
        }
    )
    return response.json()

api_key = "ey**************************************************************" #Your API key

# Get dashboard info
dashboard = get_dashboard(api_key)
print("Dashboard info:", dashboard)

# Send OTP message
message_result = send_message(
    api_key=api_key,
    phone_number="+9647832000002",
    code="823476",
    language="en"
)
print("Message send result:", message_result)
const axios = require('axios');

const BASE_URL = 'https://wh.invnty.com/api';

async function getDashboard(apiKey) {
    const headers = { 'x-api-key': apiKey };
    const response = await axios.get(`${BASE_URL}/dashboard`, { headers });
    return response.data;
}

async function sendMessage(apiKey, phoneNumber, code, language = 'ar') {
    const headers = { 'x-api-key': apiKey };
    const response = await axios.post(`${BASE_URL}/send-message`, {
        phoneNumber: phoneNumber,
        code: code,
        language: language
    }, { headers });
    return response.data;
}

const apiKey = "ey**************************************************************"; // Your API key

// Get dashboard info
getDashboard(apiKey)
    .then(dashboard => {
        console.log("Dashboard info:", dashboard);
    });

// Send OTP message
sendMessage(apiKey, "+9647832000002", "823476", "en")
    .then(messageResult => {
        console.log("Message send result:", messageResult);
    });
                            
<?php

$BASE_URL = 'https://wh.invnty.com/api';

function getDashboard($apiKey) {
    global $BASE_URL;
    $headers = array(
        'x-api-key: ' . $apiKey,
    );

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $BASE_URL . '/dashboard');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    $response = curl_exec($ch);
    curl_close($ch);

    return json_decode($response, true);
}

function sendMessage($apiKey, $phoneNumber, $code, $language = 'ar') {
    global $BASE_URL;
    $headers = array(
        'x-api-key: ' . $apiKey,
        'Content-Type: application/json'
    );

    $data = json_encode(array(
        'phoneNumber' => $phoneNumber,
        'code' => $code,
        'language' => $language
    ));

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $BASE_URL . '/send-message');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
    $response = curl_exec($ch);
    curl_close($ch);

    return json_decode($response, true);
}

$apiKey = "ey**************************************************************"; // Your API key

// Get dashboard info
$dashboard = getDashboard($apiKey);
print_r($dashboard);

// Send OTP message
$messageResult = sendMessage($apiKey, "+9647832000002", "823476", "en");
print_r($messageResult);
                        
import 'dart:convert';
import 'package:http/http.dart' as http;

const String BASE_URL = 'https://wh.invnty.com/api';

Future> getDashboard(String apiKey) async {
    final headers = {'x-api-key': apiKey};
    final response = await http.get(Uri.parse('$BASE_URL/dashboard'), headers: headers);
    return json.decode(response.body);
}

Future> sendMessage(String apiKey, String phoneNumber, String code, {String language = 'ar'}) async {
    final headers = {'x-api-key': apiKey, 'Content-Type': 'application/json'};
    final body = json.encode({
    'phoneNumber': phoneNumber,
    'code': code,
    'language': language
    });
    final response = await http.post(Uri.parse('$BASE_URL/send-message'), headers: headers, body: body);
    return json.decode(response.body);
}

void main() async {
    String apiKey = "ey**************************************************************"; // Your API key

    // Get dashboard info
    var dashboard = await getDashboard(apiKey);
    print("Dashboard info: \$dashboard");

    // Send OTP message
    var messageResult = await sendMessage(apiKey, "+9647832000002", "823476", language: "en");
    print("Message send result: \$messageResult");
}
                        
<?php
                    
namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Http;

class ApiController extends Controller
{
    private $baseUrl = 'https://wh.invnty.com/api';

    public function getDashboard($apiKey)
    {
        $response = Http::withHeaders([
            'x-api-key' => $apiKey,
        ])->get("{$this->baseUrl}/dashboard");

        return $response->json();
    }

    public function sendMessage($apiKey, $phoneNumber, $code, $language = 'ar')
    {
        $response = Http::withHeaders([
            'x-api-key' => $apiKey,
        ])->post("{$this->baseUrl}/send-message", [
            'phoneNumber' => $phoneNumber,
            'code' => $code,
            'language' => $language,
        ]);

        return $response->json();
    }
}

// Example usage in a route or controller
$apiKey = "ey**************************************************************"; // Your API key
$apiController = new ApiController();

// Get dashboard info
$dashboard = $apiController->getDashboard($apiKey);
print_r($dashboard);

// Send OTP message
$messageResult = $apiController->sendMessage($apiKey, "+9647832000002", "823476", "en");
print_r($messageResult);