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

Schedule Msg API

Endpoint: https://wbiztool.com/api/v1/schedule_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 msg, 2 for file
    • 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
    • date (String) - Message Date in dd/mm/yyyy format
    • time (String) - Message Time on given date in 24 hour format(hh:mm)
    • timezone (String) - Message Timezone on (Example: UTI, IST)
    • 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/schedule_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",
    "date":"22/08/2018",
    "time":"14:00",
    "timezone":"IST"
}' -H "Content-Type: application/json"

// 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",
        "date" : "22/08/2018",
        "time" : "14:00",
        "timezone":"IST"
    }
    url = 'https://wbiztool.com/api/v1/schedule_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,
        "msg" : "Hi, This is a test msg from WbizTool.com",
        "img_url":"<img_url>",
        "phone" : "9833371069",
        "date" : "22/08/2018",
        "time" : "14:00",
        "timezone":"IST"
    }
    url = 'https://wbiztool.com/api/v1/schedule_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",
        "date" : "22/08/2018",
        "time" : "14:00",
        "timezone":"IST"
    }
    url = 'https://wbiztool.com/api/v1/schedule_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,
        "msg" : "Hi, This is a test msg from WbizTool.com",
        "file_url":"<file_url>",
        "phone" : "9833371069",
        "date" : "22/08/2018",
        "time" : "14:00",
        "timezone":"IST"
    }
    url = 'https://wbiztool.com/api/v1/schedule_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",
        "date" : "22/08/2018",
        "time" : "14:00",
        "timezone":"IST"
    }
    url = 'https://wbiztool.com/api/v1/schedule_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/schedule_msg/';
    $myvars = 'client_id=<client_id>&api_key=<api_key>&whatsapp_client=<whatsapp_client_id>&msg_type=0&phone=9833371069&msg=Test&date=22/08/2018&time=14:00&timezone=IST';
    
    $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/schedule_msg/';
    $myvars = 'client_id=<client_id>&api_key=<api_key>&whatsapp_client=<whatsapp_client_id>&msg_type=1&phone=9833371069&msg=Test&date=22/08/2018&time=14:00&timezone=IST&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/schedule_msg/';
    $myvars = 'client_id=<client_id>&api_key=<api_key>&whatsapp_client=<whatsapp_client_id>&msg_type=1&phone=9833371069&msg=Test&date=22/08/2018&time=14:00&timezone=IST';
    
    $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/schedule_msg/';
    $myvars = 'client_id=<client_id>&api_key=<api_key>&whatsapp_client=<whatsapp_client_id>&msg_type=2&phone=9833371069&msg=Test&date=22/08/2018&time=14:00&timezone=IST&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/schedule_msg/';
    $myvars = 'client_id=<client_id>&api_key=<api_key>&whatsapp_client=<whatsapp_client_id>&msg_type=2&phone=9833371069&msg=Test&date=22/08/2018&time=14:00&timezone=IST';
    
    $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;