Welcome to the Best SMS Bulk Messaging API documentation. This API allows you to easily integrate SMS and WhatsApp messaging capabilities into your applications. Whether you are building a notification system, sending marketing campaigns, or implementing an OTP service, our API provides reliable, scalable messaging capabilities with straightforward HTTP endpoints.
Overview
Our messaging API enables developers to send text messages via SMS and WhatsApp. With our powerful, easy-to-use API, you can interact with the messaging platform using JSON or HTTP endpoints, providing flexible options for different use cases.
Core Features
Send SMS and WhatsApp Messages: Use our versatile API to send text messages through SMS or WhatsApp with configurable sender IDs and templates.
Scheduled Messaging: Set scheduled times for message delivery, making it perfect for reminders and campaigns.
OTP Verification: Easily send OTP codes for user authentication via WhatsApp or SMS, enhancing the security of your platform.
Message Delivery Status Tracking: Obtain real-time information about message delivery status, ensuring transparency and reliable communication with users.
Security: Our secured messaging API utilizes secure tokens and API keys for authorization to protect sensitive information.
Getting Started
To start using our API, you need to follow the steps below:
Sign Up: Create an account at Best SMS Bulk to get access to your API credentials.
API Key: Once registered, navigate to Agent - Users - edit the API user - Generate an API key. This key is required to authorize requests related to the secured messaging API (Section 6).
Authentication: Our API supports both Basic Authentication (username/password) and API-Key-based authorization. Please use the appropriate credentials as per the endpoint requirements.
Explore Endpoints: Use our comprehensive documentation below to explore each endpoint. Sample code for PHP, C#, Python, and JavaScript (Node.js) is provided to get you started quickly.
Base URL
All API requests should be made to the following base URL:
https://www.bestsmsbulk.com/bestsmsbulkapi
Required Headers
Content-Type: application/json
API-Key: Your unique API key for authentication
HTTP Status Codes
Our API returns standard HTTP status codes to indicate the success or failure of your request:
200 OK: The request was successful.
400 Bad Request: Your request was not properly formatted or contains invalid parameters.
401 Unauthorized: You need to authenticate with valid credentials to access this resource.
403 Forbidden: You do not have permission to access this resource.
500 Internal Server Error: An error occurred on our server. Please try again later.
Support
If you have any questions or encounter issues, please refer to the Additional Support section at the end of this document, or contact our helpdesk via email or phone.
using System;
using System.Net.Http;
using System.Collections.Generic;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var client = new HttpClient();
var values = new Dictionary
{
{ "username", "your_username" },
{ "password", "your_password" },
{ "senderid", "SENDERID" },
{ "destination", "96170123456" },
{ "message", "Hello, this is a test SMS!" }
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://www.bestsmsbulk.com/bestsmsbulkapi/sendSmsAPI.php", content);
var responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseString);
}
}
import requests
url = "https://www.bestsmsbulk.com/bestsmsbulkapi/sendSmsAPI.php"
data = {
"username": "your_username",
"password": "your_password",
"senderid": "SENDERID",
"destination": "96170123456",
"message": "Hello, this is a test SMS!"
}
response = requests.post(url, data=data)
if response.status_code == 200:
print("Response:", response.text)
else:
print("Error:", response.status_code, response.text)
using System;
using System.Net.Http;
using System.Collections.Generic;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var client = new HttpClient();
var values = new Dictionary
{
{ "username", "your_username" },
{ "password", "your_password" },
{ "senderid", "SENDERID" },
{ "destination", "96170123456" },
{ "message", "Hello, this is a test SMS!" }
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://www.bestsmsbulk.com/bestsmsbulkapi/sendSmsAPIJson.php", content);
var responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseString);
}
}
import requests
url = "https://www.bestsmsbulk.com/bestsmsbulkapi/sendSmsAPIJson.php"
data = {
"username": "your_username",
"password": "your_password",
"senderid": "SENDERID",
"destination": "96170123456",
"message": "Hello, this is a test SMS!"
}
response = requests.post(url, data=data)
if response.status_code == 200:
print("Response:", response.text)
else:
print("Error:", response.status_code, response.text)
using System;
using System.Net.Http;
using System.Collections.Generic;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var client = new HttpClient();
var values = new Dictionary
{
{ "username", "your_username" },
{ "password", "your_password" },
{ "limit", "1000" }
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://www.bestsmsbulk.com/bestsmsbulkapi/getSmsStatusJson.php", content);
var responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseString);
}
}
using System;
using System.Net.Http;
using System.Collections.Generic;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var client = new HttpClient();
var values = new Dictionary
{
{ "username", "your_username" },
{ "password", "your_password" },
{ "senderid", "SENDERID" },
{ "destination", "96170123456" },
{ "message", "Hello, this is a test message!" },
{ "route", "wp" },
{ "template", "template_name" },
{ "variables", "variable1,variable2" }
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://www.bestsmsbulk.com/bestsmsbulkapi/common/sendSmsWpAPITemplate.php", content);
var responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseString);
}
}
import requests
url = "https://www.bestsmsbulk.com/bestsmsbulkapi/common/sendSmsWpAPITemplate.php"
data = {
"username": "your_username",
"password": "your_password",
"senderid": "SENDERID",
"destination": "96170123456",
"message": "Hello, this is a test message!",
"route": "wp",
"template": "template_name",
"variables": "variable1,variable2"
}
response = requests.post(url, data=data)
if response.status_code == 200:
print("Response:", response.text)
else:
print("Error:", response.status_code, response.text)
using System;
using System.Net.Http;
using System.Collections.Generic;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var client = new HttpClient();
var values = new Dictionary
{
{ "username", "your_username" },
{ "password", "your_password" },
{ "destination", "96170123456" },
{ "message", "Your OTP code is 123456" },
{ "route", "wp" }
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://www.bestsmsbulk.com/bestsmsbulkapi/common/sendSmsWpAPI.php", content);
var responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseString);
}
}
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var client = new HttpClient();
var jsonData = new
{
username = "your_username",
password = "your_password",
senderid = "SENDERID",
destination = "96170123456",
message = "Hello, this is a test message!",
route = "wp",
template = "template_name",
variables = "variable1,variable2"
};
var content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(jsonData), Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://www.bestsmsbulk.com/bestsmsbulkapi/common/messaging_api_secured_json.php", content);
var responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseString);
}
}
import requests
import json
url = "https://www.bestsmsbulk.com/bestsmsbulkapi/common/messaging_api_secured_json.php"
data = {
"username": "your_username",
"password": "your_password",
"senderid": "SENDERID",
"destination": "96170123456",
"message": "Hello, this is a test message!",
"route": "wp",
"template": "template_name",
"variables": "variable1,variable2"
}
headers = {
"Content-Type": "application/json"
}
response = requests.post(url, data=json.dumps(data), headers=headers)
if response.status_code == 200:
print("Response:", response.text)
else:
print("Error:", response.status_code, response.text)