Schedule Message API

Great for appointment reminders, birthday wishes, follow-ups, and time-sensitive marketing campaigns

End Point: https://wbiztool.com/api/v1/schedule_msg/
Request Type: POST
Required Fields in Request
Note: You can schedule messages to either individual phone numbers OR WhatsApp groups. Use either the phone parameter for individual messages or the group_name parameter for group messages, but not both in the same request.
  • client_id (Integer) - Your Client Id (Given on Api keys page
  • api_key (String) - Your Api Key (Given on Api keys page
  • 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: 919632066772. Use either phone OR group_name, not both.
  • group_name (String) - WhatsApp group name for group messages (e.g., "My Group"). Use either phone OR group_name, not both.
  • country_code (string) - Receiver's country code. eg: 91 for india, 1 for USA. Only applies to phone messages.
  • 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. Supports all pytz timezone strings including:
    • Standard abbreviations: UTC, IST, EST, CST, MST, PST, CET, JST, etc.
    • Full timezone names: Asia/Kolkata, US/Eastern, Europe/London, Australia/Sydney, etc.
    • Any valid pytz timezone identifier (e.g., America/New_York, Europe/Berlin, Asia/Tokyo)
    If not specified, defaults to IST. View complete timezone reference.
  • webhook (String- Optional)- Webhook Url where msg_id and status will be posted
Fields in Response
  • msg_id (Integer) - If successfully submitted your message 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 explanation will be given in message key
Example

The following examples use curl to make API requests. Note the use of the api key, client id, whatsapp client id and the setting of the Content-Type header.

Example for Phone Number Message:
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":"9632066772",
    "date":"22/08/2018",
    "time":"14:00",
    "timezone":"IST",
    "country_code":"91"
}' -H "Content-Type: application/json"

// Response
{"status": 1, "message": "Created", "msg_id": <unique_msg_id>}
Example for Group Message:
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": "Meeting reminder: Don't forget our team meeting at 3 PM today!",
    "group_name":"Team Meeting",
    "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 to Phone Number

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" : "9632066772",
    "date" : "22/08/2018",
    "time" : "14:00",
    "timezone":"IST",
    "country_code":"91"
}
url = 'https://wbiztool.com/api/v1/schedule_msg/'
response = requests.post(url,data=data).text

Normal Text Msg to Group

import requests
data={
    "client_id" : <client_id>,
    "api_key" : "<api_key>",
    "whatsapp_client" : <whatsapp_client_id>,
    "msg_type": 0,
    "msg" : "Meeting reminder: Don't forget our team meeting at 3 PM today!",
    "group_name" : "Team Meeting",
    "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" : "9632066772",
    "date" : "22/08/2018",
    "time" : "14:00",
    "timezone":"IST",
    "country_code":"91"
}
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" : "9632066772",
    "date" : "22/08/2018",
    "time" : "14:00",
    "timezone":"IST",
    "country_code":"91"
}
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" : "9632066772",
    "date" : "22/08/2018",
    "time" : "14:00",
    "timezone":"IST",
    "country_code":"91"
}
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" : "9632066772",
    "date" : "22/08/2018",
    "time" : "14:00",
    "timezone":"IST",
    "country_code":"91"
}
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 to Phone Number

$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=9632066772&country_code=91&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;

Normal Text Msg to Group

$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&group_name=Team Meeting&msg=Meeting reminder&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=9632066772&country_code=91&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=9632066772&country_code=91&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=9632066772&country_code=91&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=9632066772&country_code=91&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;
                                                    <ul class="nav nav-pills bg-nav-pills nav-justified mb-3">
<li class="nav-item">
<a href="#home1" data-toggle="tab" aria-expanded="false" class="nav-link rounded-0">
<i class="mdi mdi-home-variant d-md-none d-block"></i>
<span class="d-none d-md-block">Home</span>
</a>
</li>
<li class="nav-item">
<a href="#profile1" data-toggle="tab" aria-expanded="true" class="nav-link rounded-0 active">
<i class="mdi mdi-account-circle d-md-none d-block"></i>
<span class="d-none d-md-block">Profile</span>
</a>
</li>
<li class="nav-item">
<a href="#settings1" data-toggle="tab" aria-expanded="false" class="nav-link rounded-0">
<i class="mdi mdi-settings-outline d-md-none d-block"></i>
<span class="d-none d-md-block">Settings</span>
</a>
</li>
</ul>

<div class="tab-content">
<div class="tab-pane" id="home1">
<p>...</p>
</div>
<div class="tab-pane show active" id="profile1">
<p>...</p>
</div>
<div class="tab-pane" id="settings1">
<p>...</p>
</div>
</div>