• You'll love us, guaranteed
    Free Signup with 100 credits and a 60-day satisfaction guarantee.

Send Msg API

Endpoint: https://wbiztool.com/api/v1/send_msg/

Request Type: POST

Fields:
  • Required Fields in Request
    • client_id (Integer) - Your Client Id (Given on Dashboard in API Setting Section
    • api_key (String) - Your Api Key (Given on Dashboard in API Setting Section
    • whatsapp_client (Integer) - Your WhatsApp Client Id (Given on Whatsapp Setting Page) Click here
    • msg_type (Integer) - 0 for Text msg, 1 for Image with msg, 2 for File with msg
    • img_url (String) - Image Url (Mandotary when msg_type is 1) and url should be ending with valid image extension (.png, .jpg, .jpeg etc)
    • file_url (String) - File Url from which file can be directly downloaded (Mandotary when msg_type is 2 and file is not uploaded)
    • file_name (String) - File Name (Mandotary when msg_type is 2)
    • file (FILE) - File(Mandotary when msg_type is 2 and file_url is not provided)
    • phone (String) - Receiver's Whatsapp Number with country code. eg: 919833371069
    • msg (String) - Message Text
    • webhook (String- Optional)- Webhook Url where msg_id and status will be posted
  • Response
    • msg_id (Integer) - If successfully submitted the data then msg id. You can save this id to check the status of particular message. You can save it for future reference.
    • message (String) - Readable status of your request
    • status (Integer) - 0/1 if status is 0 then there is some error with this request explaination will be given in message key

Example


The following example uses curl to make an API request. Note the use of the api key, client id, whatsapp client id and the setting of the Content-Type header.

curl -X POST https://wbiztool.com/api/v1/send_msg/  -d '{
    "client_id": <your_client_id>,
    "api_key": "<your_api_key>",
    "whatsapp_client": <your_whatsapp_client_id>,
    "msg_type": 0,
    "msg": "Hi, This is a *test* msg from _WbizTool.com_",
    "phone":"9833371069"
}' 

// Response
{"status": 1, "message": "Created", "msg_id": <unique_msg_id>}

  •  Normal Text Msg

    import requests
    data={
        "client_id" : <client_id>,
        "api_key" : "<api_key>",
        "whatsapp_client" : <whatsapp_client_id>,
        "msg_type": 0,
        "msg" : "Hi, This is a *test* msg from _WbizTool.com_",
        "phone" : "9833371069"
    }
    url = 'https://wbiztool.com/api/v1/send_msg/'
    response = requests.post(url,data=data).text
                                    

     Image Text Msg with Image url

    import requests
    data={
        "client_id" : <client_id>,
        "api_key" : "<api_key>",
        "whatsapp_client" : <whatsapp_client_id>,
        "msg_type": 1,
        "img_url":"<img_url>",
        "msg" : "Hi, This is a *test* msg from _WbizTool.com_",
        "phone" : "9833371069"
    }
    url = 'https://wbiztool.com/api/v1/send_msg/'
    response = requests.post(url,data=data).text
                                    

     Image Text Msg with Image File

    import requests
    data={
        "client_id" : <client_id>,
        "api_key" : "<api_key>",
        "whatsapp_client" : <whatsapp_client_id>,
        "msg_type": 1,
        "msg" : "Hi, This is a *test* msg from _WbizTool.com_",
        "phone" : "9833371069"
    }
    url = 'https://wbiztool.com/api/v1/send_msg/'
    files = {'file': open('path/to/image/file', 'rb')}
    response = requests.post(url,data=data,files=files).text
                                    

     File Text Msg with File url

    import requests
    data={
        "client_id" : <client_id>,
        "api_key" : "<api_key>",
        "whatsapp_client" : <whatsapp_client_id>,
        "msg_type": 2,
        "file_url":"<file_url>",
        "msg" : "Hi, This is a *test* msg from _WbizTool.com_",
        "phone" : "9833371069"
    }
    url = 'https://wbiztool.com/api/v1/send_msg/'
    response = requests.post(url,data=data).text
                                    

     File Text Msg with File

    import requests
    data={
        "client_id" : <client_id>,
        "api_key" : "<api_key>",
        "whatsapp_client" : <whatsapp_client_id>,
        "msg_type": 2,
        "msg" : "Hi, This is a *test* msg from _WbizTool.com_",
        "phone" : "9833371069"
    }
    url = 'https://wbiztool.com/api/v1/send_msg/'
    files = {'file': open('path/to/file', 'rb')}
    response = requests.post(url,data=data,files=files).text
                                    
  • Normal Text Msg

    $url = 'https://wbiztool.com/api/v1/send_msg/';
    $myvars = 'client_id=<client_id>&api_key=<api_key>&whatsapp_client=<whatsapp_client_id>&msg_type=0&phone=9833371069&msg=Test';
    
    $ch = curl_init( $url );
    curl_setopt( $ch, CURLOPT_POST, 1);
    curl_setopt( $ch, CURLOPT_POSTFIELDS, $myvars);
    
    $response = curl_exec( $ch );
    echo $response;

    Image Text Msg With Image Url

    $url = 'https://wbiztool.com/api/v1/send_msg/';
    $myvars = 'client_id=<client_id>&api_key=<api_key>&whatsapp_client=<whatsapp_client_id>&phone=9833371069&msg=Test&msg_type=1&img_url=<img_url>';
    $ch = curl_init( $url );
    curl_setopt( $ch, CURLOPT_POST, 1);
    curl_setopt( $ch, CURLOPT_POSTFIELDS, $myvars);
    
    $response = curl_exec( $ch );
    echo $response;

    Image Text Msg With Image File

    $url = 'https://wbiztool.com/api/v1/send_msg/';
    $myvars = 'client_id=<client_id>&api_key=<api_key>&whatsapp_client=<whatsapp_client_id>&phone=9833371069&msg=Test&msg_type=1';
    $fp = fopen('/my/folder/flower.png', 'wb');
    $ch = curl_init( $url );
    curl_setopt($ch, CURLOPT_FILE, $fp);
    curl_setopt( $ch, CURLOPT_POST, 1);
    curl_setopt( $ch, CURLOPT_POSTFIELDS, $myvars);
    
    $response = curl_exec( $ch );
    echo $response;

    File Text Msg With File Url

    $url = 'https://wbiztool.com/api/v1/send_msg/';
    $myvars = 'client_id=<client_id>&api_key=<api_key>&whatsapp_client=<whatsapp_client_id>&phone=9833371069&msg=Test&msg_type=2&file_url=<file_url>';
    $ch = curl_init( $url );
    curl_setopt( $ch, CURLOPT_POST, 1);
    curl_setopt( $ch, CURLOPT_POSTFIELDS, $myvars);
    
    $response = curl_exec( $ch );
    echo $response;

    File Text Msg With File

    $url = 'https://wbiztool.com/api/v1/send_msg/';
    $myvars = 'client_id=<client_id>&api_key=<api_key>&whatsapp_client=<whatsapp_client_id>&phone=9833371069&msg=Test&msg_type=2';
    $fp = fopen('/my/folder/invoice.pdf', 'wb');
    $ch = curl_init( $url );
    curl_setopt($ch, CURLOPT_FILE, $fp);
    curl_setopt( $ch, CURLOPT_POST, 1);
    curl_setopt( $ch, CURLOPT_POSTFIELDS, $myvars);
    
    $response = curl_exec( $ch );
    echo $response;
  • require 'net/http'
    
    params = {
    	client_id: "<client_id>",
    	api_key: "<api_key>",
    	whatsapp_client: "<whatsapp_client_id>",
    	msg_type: 0,
    	msg: "Hi, This is a *test* msg from _WbizTool.com_",
    	phone: "919833371069"
    }
    url = 'https://wbiztool.com/api/v1/send_msg/'
    uri = URI(url)
    res = Net::HTTP.post_form(uri, params)
    JSON.parse(res.body)