SMS API
SMS API Documentation
Single SMS এবং Bulk SMS পাঠানোর জন্য এই API ব্যবহার করুন। API Key ও Secret Key দিয়ে authentication করে SMS submit করা যাবে।
Getting Started
SMS API ব্যবহার করার জন্য user account create করে dashboard থেকে API Key এবং Secret Key সংগ্রহ করুন।
1. Account
Register করে account খুলুন।
2. API Key
API Keys page থেকে key নিন।
3. Balance
SMS পাঠানোর জন্য account balance থাকতে হবে।
4. Send SMS
Number এবং message দিয়ে SMS submit করুন।
সব request
POST method দিয়ে করা recommended।
API Key ও Secret Key client-side এ প্রকাশ করবেন না।
API Endpoint
POST
https://nurr.top/api/send-sms.php
Authentication Parameters
| Parameter | Required | Description |
|---|---|---|
api_key |
Yes | User dashboard থেকে পাওয়া API Key। |
api_secret |
Yes | User dashboard থেকে পাওয়া Secret Key। |
Send SMS
Single SMS বা Bulk SMS পাঠাতে এই endpoint ব্যবহার করুন। একাধিক নাম্বার পাঠাতে comma দিয়ে number আলাদা করুন।
Request Parameters
| Parameter | Required | Example | Description |
|---|---|---|---|
api_key |
Yes | YOUR_API_KEY | আপনার API Key। |
api_secret |
Yes | YOUR_SECRET_KEY | আপনার Secret Key। |
to |
Yes | 01800000000 | Recipient mobile number। 01X অথবা 8801X format support করে। |
msg |
Yes | Hello Test SMS | SMS message body। |
schedule |
No | 2026-04-25 22:16:29 | Future schedule time। Format: Y-m-d H:i:s |
Single SMS cURL Example
curl -X POST "https://nurr.top/api/send-sms.php" \ -d "api_key=YOUR_API_KEY" \ -d "api_secret=YOUR_SECRET_KEY" \ -d "to=01800000000" \ -d "msg=Hello Test SMS"
Bulk SMS cURL Example
curl -X POST "https://nurr.top/api/send-sms.php" \ -d "api_key=YOUR_API_KEY" \ -d "api_secret=YOUR_SECRET_KEY" \ -d "to=01800000000,01700000000,01600000000" \ -d "msg=Hello Bulk SMS"
PHP Example
$ch = curl_init("https://nurr.top/api/send-sms.php");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => [
"api_key" => "YOUR_API_KEY",
"api_secret" => "YOUR_SECRET_KEY",
"to" => "01800000000,01700000000",
"msg" => "Hello SMS"
],
CURLOPT_RETURNTRANSFER => true
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
Billing Calculation
SMS charge message type, character count এবং recipient count অনুযায়ী হিসাব হবে।
| Type | Single SMS Limit | Multi SMS Limit | Charge |
|---|---|---|---|
| English | 160 characters | 153 characters / SMS | Admin settings অনুযায়ী |
| Bangla | 70 characters | 67 characters / SMS | Admin settings অনুযায়ী |
Bulk SMS এর total charge = per SMS charge × SMS count per number × total recipient count।
Success Response
{
"success": true,
"order_number": "SMSA1B2C3D4E5F6",
"provider_request_id": "123456",
"status": "complete",
"provider_request_status": "Complete",
"provider_request_charge": "0.7000",
"message_type": "english",
"message_length": 25,
"total_recipients": 2,
"sms_per_number": 1,
"total_sms": 2,
"user_per_sms_charge": "0.3500",
"user_total_charge": "0.7000",
"balance_before": "100.0000",
"balance_after": "99.3000"
}
Processing Response
{
"success": true,
"order_number": "SMSA1B2C3D4E5F6",
"provider_request_id": "123456",
"status": "submitted",
"provider_request_status": null,
"provider_request_charge": "0.0000"
}
Error Responses
| HTTP Code | Error | Meaning |
|---|---|---|
| 401 | Invalid API credentials. |
API Key বা Secret Key ভুল। |
| 422 | Missing parameters. |
Required parameter missing। |
| 422 | Invalid number. |
Recipient number ভুল। |
| 422 | Invalid schedule format. |
Schedule format ভুল। |
| 422 | Insufficient balance. |
User balance কম। |
| 500 | SMS settings missing. |
Admin SMS settings active নেই। |
| 500 | SMS sending failed. |
Provider SMS request reject করেছে। |
Error JSON Example
{
"error": "Invalid number.",
"number": "12345"
}
Insufficient Balance Example
{
"error": "Insufficient balance.",
"required_balance": "1.0500",
"current_balance": "0.5000"
}