Documentation API version 1.0
You can access the api version 1 documentation at this link
You can access the api version 1 documentation at this link
WABLAS is WhatsApp API gateway service for sending and receiving messages, notification, scheduler, reminder, group message, tracking, and chatbots with simple integration for your business
Our API was designed to be extremely easy to use and accessible to everyone, no matter the programing language or frameworks you use
Note:
You can send bulk text messages to personal number with one click
POST/api/v2/send-bulk/text
<?php
$curl = curl_init();
$token = "";
$payload = [
"data" => [
[
'phone' => '081xxx',
'message' => 'try message 1'
],
[
'phone' => '085xxx',
'message' => 'try message 2'
],
...
]
];
curl_setopt($curl, CURLOPT_HTTPHEADER,
array(
"Authorization: $token",
"Content-Type: application/json"
)
);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($payload) );
curl_setopt($curl, CURLOPT_URL, "https://wablas.com/api/v2/send-bulk/text");
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
$result = curl_exec($curl);
curl_close($curl);
echo "<pre>";
print_r($result);
?>
Authorization | Required | Your Token from https://console.wablas.com, can be seen in the menu: Device - Setting |
---|---|---|
phone | Required | Target phone number. You can use the country code prefix or not. Example: 081223xxxx |
message | Required | Text message to be sent. Format: UTF-8 or UTF-16 string. for single newline (\n1), double newline (\n2) |
Response:
{
"status": true,
"message": "successfully sent text",
"data": {
"quota": "unlimited",
"message": [
{
"id": "STRKW2dy5b3Qq60Hi3e9RCund1PS6lZ9",
"phone": "081xxx",
"message": "try message 1",
"status": "pending"
},
{
"id": "STR282xxHkl0lxaLiaHlpVLh50km0k78",
"phone": "085xxx",
"message": "try message 2",
"status": "pending"
}
]
}
}
You can send bulk text message to whatsapp group with one click
POST/api/v2/send-bulk/text-group
<?php
$curl = curl_init();
$token = "";
$payload = [
"data" => [
[
'groupId' => '154xxxxx',
'phone' => '081xxx',
'message' => 'try message 1'
],
[
'groupId' => '154xxxxx',
'phone' => '085xxx',
'message' => 'try message 2'
],
...
]
];
curl_setopt($curl, CURLOPT_HTTPHEADER,
array(
"Authorization: $token",
"Content-Type: application/json"
)
);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($payload) );
curl_setopt($curl, CURLOPT_URL, "https://wablas.com/api/v2/send-bulk/text-group");
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
$result = curl_exec($curl);
curl_close($curl);
echo "<pre>";
print_r($result);
?>
Authorization | Required | Your Token from https://console.wablas.com, can be seen in the menu: Device - Setting |
---|---|---|
phone | Required | Target phone number. You can use the country code prefix or not. Example: 081223xxxx |
message | Required | Text message to be sent. Format: UTF-8 or UTF-16 string. for single newline (\n1), double newline (\n2) |
Response:
{
"status": true,
"message": "successfully sent text",
"data": {
"quota": "unlimited",
"message": [
{
"id": "STRKW2dy5b3Qq60Hi3e9RCund1PS6lZ9",
"phone": "081xxx",
"message": "try message 1",
"status": "pending"
},
{
"id": "STR282xxHkl0lxaLiaHlpVLh50km0k78",
"phone": "085xxx",
"message": "try message 2",
"status": "pending"
}
]
}
}
You can send bulk image messages to personal number with one click
POST/api/v2/send-bulk/image
<?php
$curl = curl_init();
$token = "";
$payload = [
"data" => [
[
'phone' => '081xxx',
'caption' => 'caption image 1',
'image' => 'https://xxxx.com/poster1.jpeg',
'secret' => false, // or true
'priority' => false, // or true
'category' => 'image' // or text
],
[
'phone' => '081xxx',
'caption' => 'caption image 2',
'image' => 'https://xxxx.com/poster2.jpeg',
'secret' => false, // or true
'priority' => false, // or true
'category' => 'image' // or text
],
[
'phone' => '085xxx',
'message' => 'message 3',
'secret' => false, // or true
'priority' => false, // or true
'category' => 'text' // or image
],
...
]
];
curl_setopt($curl, CURLOPT_HTTPHEADER,
array(
"Authorization: $token",
"Content-Type: application/json"
)
);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($payload) );
curl_setopt($curl, CURLOPT_URL, "https://wablas.com/api/v2/send-bulk/image");
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
$result = curl_exec($curl);
curl_close($curl);
echo "<pre>";
print_r($result);
?>
Authorization | Required | Your Token from https://console.wablas.com, can be seen in the menu: Device - Setting |
---|---|---|
phone | Required | Target phone number. You can use the country code prefix or not. Example: 081223xxxx |
caption | Optional | Text image must on the format: UTF-8 or UTF-16 string. maximum 700 character |
image | Required | URL of image file to be sent. Make sure the image has been uploaded on the server and can be accessed by the public. |
support extension | jpg, jpeg, png, gif |
Response:
{
"status": true,
"message": "successfully sent text",
"data": {
"quota": "unlimited",
"message": [
{
"id": "STRKW2dy5b3Qq60Hi3e9RCund1PS6lZ9",
"phone": "081xxx",
"caption": "caption image 1",
'image': 'https://xxxx.com/poster1.jpeg',
"status": "pending"
},
{
"id": "DSADSTRKW2dyHi3e9RCund1PS6lDSADA",
"phone": "081xxx",
"caption": "caption image 2",
'image': 'https://xxxx.com/poster2.jpeg',
"status": "pending"
},
{
"id": "DSFKLOROIW4LWROI2332MKL234OIR9ASD",
"phone": "085xxx",
"message": "message 2",
"status": "pending"
}
]
}
}
You can send bulk image to a group to whatsapp group with one click
POST/api/v2/send-bulk/image-group
<?php
$curl = curl_init();
$token = "";
$payload = [
"data" => [
[
'groupId' => '154xxxxx',
'phone' => '081xxx',
'caption' => 'try message 1',
'image' => 'https://xxxx.com/poster1.jpeg',
'secret' => false, // or true
'priority' => false, // or true
],
[
'groupId' => '154xxxxx',
'phone' => '085xxx',
'caption' => 'try message 2',
'image' => 'https://xxxx.com/poster2.jpeg',
'secret' => false, // or true
'priority' => false, // or true
],
...
]
];
curl_setopt($curl, CURLOPT_HTTPHEADER,
array(
"Authorization: $token",
"Content-Type: application/json"
)
);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($payload) );
curl_setopt($curl, CURLOPT_URL, "https://wablas.com/api/v2/send-bulk/image-group");
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
$result = curl_exec($curl);
curl_close($curl);
echo "<pre>";
print_r($result);
?>
Authorization | Required | Your Token from https://console.wablas.com, can be seen in the menu: Device - Setting |
---|---|---|
phone | Required | Target phone number. You can use the country code prefix or not. Example: 081223xxxx |
caption | Optional | Text image must on the format: UTF-8 or UTF-16 string. maximum 700 character |
image | Required | URL of image file to be sent. Make sure the image has been uploaded on the server and can be accessed by the public. |
support extension | jpg, jpeg, png, gif |
Response:
{
"status": true,
"message": "successfully sent text",
"data": {
"quota": "unlimited",
"message": [
{
"id": "STRKW2dy5b3Qq60Hi3e9RCund1PS6lZ9",
'groupId': '154xxxxx',
"phone": "081xxx",
"caption": "try message 1",
'image': 'https://xxxx.com/poster1.jpeg',
"status": "pending"
},
{
"id": "STR282xxHkl0lxaLiaHlpVLh50km0k78",
'groupId': '154xxxxx',
"phone": "085xxx",
"caption": "try message 2",
'image': 'https://xxxx.com/poster2.jpeg',
"status": "pending"
}
]
}
}
resend whatsapp message by id
GETapi/v2/resend-message?token={your-token}&id={xxx}
<?php
$resutl = file_get_contents("https://wablas.com/api/v2/resend-message?token=xxxxx&id=STRp02W0v3t1j2t92809Gv2X066Oc6Et")
echo "<pre>";
print_r($result);
?>
Response:
{
"status": true,
"message": "resend message successfully",
}
cancel whatsapp message by id
GETapi/v2/cancel-sending?token={your-token}&id={xxx}
<?php
$resutl = file_get_contents("https://wablas.com/api/v2/cancel-sending?token=xxxxx&id=STRp02W0v3t1j2t92809Gv2X066Oc6Et")
echo "<pre>";
print_r($result);
?>
Response:
{
"status": true,
"message": "cancel sending message successfully",
}