Developer Documentation
Integrate SMS, Voice Call, and Account services into your application with our simple REST API.
Quick Start
Send your first SMS or Voice Call in under 2 minutes.
Get your API Token
Create an account or sign in to get your API token.
Choose your service
Use the SMS, Voice Call, or Account endpoints.
Send & check response
Make the request using GET or POST and check the JSON response.
Authentication
Every request needs a valid API token.
Your token is available after registration. Pass it using any of these methods:
GET Query
?api_token=TOKEN
POST Body
api_token=TOKEN
HTTP Header
Bearer TOKEN
Send SMS
Deliver SMS messages to any mobile number.
Required Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_token | String | Yes | Your secret API token. |
| phone | String | Yes | Mobile number (e.g. 8801700000000). |
| message | String | Yes | The SMS text content to deliver. |
Send Voice Call
Initiate voice calls using text or audio.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_token | String | Yes | Your secret API token. |
| number | String | Yes | Destination phone number. |
| txt | String | Either | Text to convert to speech. Required if audio is not set. |
| audio | String | Either | Direct URL to audio file (MP3, WAV, OGG). Required if txt is not set. |
| time | Integer | No | Duration in seconds (default: 30, max: 300). |
Provide either txt or audio — not both. If both are set, audio takes priority.
Account APIs
Retrieve balance, profile, and pricing information.
Balance
{
"status": "success",
"data": {
"main_balance": 345.84,
"sms_balance": 1250,
"call_balance": 50,
"currency": "BDT"
}
}
Profile
{
"status": "success",
"data": {
"id": 201,
"name": "John Doe",
"email": "john@example.com",
"status": "active",
"joined_at": "2025-08-15"
}
}
Pricing
{
"status": "success",
"data": {
"english_sms_cost": 0.30,
"unicode_sms_cost": 0.35,
"voice_call_cost": 0.50,
"english_sms_length": 150,
"unicode_sms_length": 69,
"currency": "BDT"
}
}
Code Examples
Ready-to-use snippets for every language.
https://www.sms.bd1b.com/api/v1/send?api_token=YOUR_TOKEN&phone=8801700000000&message=Hello+World
https://www.sms.bd1b.com/api/v1/call?api_token=YOUR_TOKEN&number=8801700000000&txt=Your+Text&time=30
https://www.sms.bd1b.com/api/v1/call?api_token=YOUR_TOKEN&number=8801700000000&audio=https://example.com/file.mp3&time=30
curl -X POST https://www.sms.bd1b.com/api/v1/send \
-d "api_token=YOUR_TOKEN" \
-d "phone=8801700000000" \
-d "message=Hello"
curl -X POST https://www.sms.bd1b.com/api/v1/call \
-d "api_token=YOUR_TOKEN" \
-d "number=8801700000000" \
-d "txt=Your Text" \
-d "time=30"
curl -X POST https://www.sms.bd1b.com/api/v1/call \
-d "api_token=YOUR_TOKEN" \
-d "number=8801700000000" \
-d "audio=https://example.com/file.mp3"
<?php
$smsData = [
'api_token' => 'YOUR_TOKEN',
'phone' => '8801700000000',
'message' => 'Hello from PHP!'
];
$ch = curl_init("https://www.sms.bd1b.com/api/v1/send");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($smsData));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$smsResponse = json_decode(curl_exec($ch), true);
curl_close($ch);
echo $smsResponse['status'] === 'success' ? 'SMS sent!' : $smsResponse['message'];
$balanceData = ['api_token' => 'YOUR_TOKEN'];
$ch = curl_init("https://www.sms.bd1b.com/api/v1/balance?" . http_build_query($balanceData));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$balance = json_decode(curl_exec($ch), true);
curl_close($ch);
echo 'Main Balance: ' . $balance['data']['main_balance'];
?>
const data = new URLSearchParams();
data.append('api_token', 'YOUR_TOKEN');
data.append('phone', '8801700000000');
data.append('message', 'Hello from JavaScript!');
fetch("https://www.sms.bd1b.com/api/v1/send", {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: data.toString()
})
.then(r => r.json())
.then(d => console.log(d.status === 'success' ? 'SMS sent!' : d.message));
fetch("https://www.sms.bd1b.com/api/v1/balance?api_token=YOUR_TOKEN")
.then(r => r.json())
.then(d => console.log('Balance:', d.data.main_balance));
use Illuminate\Support\Facades\Http;
$smsResponse = Http::asForm()->post('https://www.sms.bd1b.com/api/v1/send', [
'api_token' => 'YOUR_TOKEN',
'phone' => '8801700000000',
'message' => 'Hello from Laravel!',
]);
$balance = Http::get('https://www.sms.bd1b.com/api/v1/balance', [
'api_token' => 'YOUR_TOKEN'
])->json();
echo $balance['data']['main_balance'];
import requests
sms_data = {
'api_token': 'YOUR_TOKEN',
'phone': '8801700000000',
'message': 'Hello from Python!'
}
sms = requests.post("https://www.sms.bd1b.com/api/v1/send", data=sms_data).json()
print('SMS:', sms['status'])
balance = requests.get("https://www.sms.bd1b.com/api/v1/balance",
params={'api_token': 'YOUR_TOKEN'}).json()
print('Main Balance:', balance['data']['main_balance'])
pricing = requests.get("https://www.sms.bd1b.com/api/v1/pricing",
params={'api_token': 'YOUR_TOKEN'}).json()
print('Call Rate:', pricing['data']['voice_call_cost'])
Response Format
Every API response returns JSON.
{
"status": "success",
"message": "SMS sent successfully"
}
{
"status": "error",
"message": "Insufficient balance"
}
Error Codes
Quick reference for troubleshooting.
| Code | Meaning | Solution |
|---|---|---|
| 401 | Invalid/missing token | Verify on API Token page |
| 400 | Missing parameters | Provide all required fields |
| 402 | Insufficient balance | Top up from dashboard |
| 500 | Server error | Retry or contact support |