Automas SMS API Documentation
Our Automas SMS API allows developers to send and manage SMS seamlessly from any application, regardless of platform or programming language. Integration is simple with JSON-based GET and POST support.
Generate Your API Key to Access the Service
Send message using plain HTTP
Below parameters required before sending message
- Api-Key
- Sender ID
- SMS text
- Type
For Long sms below additional parameter required
- Smsformat
For unicode sms below additional parameter required
Parameter Details
1.User Validation
Api-Key
d6a3493c3f93a6a4def0847440c3ccfc
2.Message
Sender
Dynamic sender ID available in the panel
SMS Text
Message body must be http encoded. For single ASCII sms it must be within 160 characters and for Unicode sms it must be 70 characters. Must be http encoded format
Type
For Unicode sms use 8 and for ASCII this parameter not required Example:smsformat=8 (for Unicode)
SMS Format
For Unicode sms use 8 and for ASCII this parameter not required Example:smsformat=8 (for Unicode)
3.Destination
msisdn
Message recipient address Example: contacts=01886888816 for Bulk SMS contacts=01886888816,88017XXXXXXXX,....
API Request HTTP
Send message using Json
Below parameters required before sending message
- Api-Key
- Sender ID
- SMS text
- Type
For Long sms below additional parameter required
- Smsformat
For unicode sms below additional parameter required
Parameter Details
1.User Validation
Api-Key
d6a3493c3f93a6a4def0847440c3ccfc
2.Message
Sender
Dynamic sender ID available in the panel
SMS Text
Message body must be http encoded. For single ASCII sms it must be within 160 characters and for Unicode sms it must be 70 characters. Must be http encoded format
Type
For Unicode sms use 8 and for ASCII this parameter not required Example:smsformat=8 (for Unicode)
3.Destination
msisdn
Message recipient address Example: contacts=01886888816 for Bulk SMS contacts=01886888816,88017XXXXXXXX,....
API Request Json (Single SMS and Bulk SMS)
Request Body
Request body in json format for single SMS
{
"api_key" : "d6a3493c3f93a6a4def0847440c3ccfc",
"senderid" : "8809617632463",
"type" : "text",
"scheduledDateTime" : "",
"msg" : "Enter Your Message",
"contacts" : "01886888816"
}
Request body in json format for Bulk SMS
{
"api_key" : "d6a3493c3f93a6a4def0847440c3ccfc",
"senderid" : "8809617632463",
"type" : "text",
"scheduledDateTime" : "",
"msg" : "Enter Your Message",
"contacts" : "01886888816+88017XXXXXXXX..."
}
API Responses details
Successful response in json format for single SMS and Bulk SMS
status
It will inform the status whether it is SUCCESS or FAIL.Check Status Code Meaning
ID
For each SMS, system will provide a uniq ID
msisdn
Client provided MSISDN/CONTACTS will be here.
API Responses
Successful response in json format for single SMS
{
"response":[
{
"status":0,
"id":296334,
"msisdn":"01886888816"
}
]
}
Successful response in json format for Bulk SMS
{
"response":[
{
"status":0,
"id":296334,
"msisdn":"01886888816"
},
{
"status":0,
"id":296335,
"msisdn":"88017XXXXXXXX"
},
{
"status":0,
"id":296336,
"msisdn":"88018XXXXXXXX"
}
]
}
API Request Json (Dynamic SMS)
Request Body
Request body in json format for Dynamic SMS
{
"apikey": "d6a3493c3f93a6a4def0847440c3ccfc",
"sender": "8809617632463",
"messages": [
{
"id": 1,
"msisdn": "01886888816",
"smstext": "Enter Your Message"
},
{
"id": 2,
"msisdn": "88017XXXXXXXX",
"smstext": "Enter Your Message"
}
]
}
API Responses details
Successful response in json format for single SMS
status
It will inform the status whether it is SUCCESS or FAIL.Check Status Code Meaning
cid
For each SMS request there will be a unique reference ID for Client
sid
For each SMS, system will provide a uniq ID
msisdn
Client provided MSISDN/CONTACTS will be here.
API Responses
Successful response in json format for Dynamic SMS
{
"response": [
{
"status": 0,
"cid": 1,
"sid": 11,
"msisdn": "01886888816"
},
{
"status": 0,
"cid": 2,
"sid": 12,
"msisdn": "88017XXXXXXXX"
}
]
}
Balance Check API
Check your current SMS balance using API credentials
Parameter Details
Api-Key
d6a3493c3f93a6a4def0847440c3ccfc
API Request Json (Single SMS and Bulk SMS)
API Responses
Successful response in JSON format
{
"response" : "xxxx.xx"
}
Status Code Meaning
Common API response status codes and meanings
| Status Code | Meaning |
|---|---|
| 0 | Success |
| 101 | Invalid Message Length |
| 102 | Sender Not Valid |
| 103 | Authentication Failed |
| 104 | Invalid User |
| 105 | Invalid MSISDN |
| 106 | Incorrect API Key |
| 107 | User Account Suspended |
| 108 | IP Address Not Allowed |
| 109 | API Access Not Allowed |
| 110 | Do Not Disturb (DND) |
| 111 | Spam Word Detected in Message |
| 1000 | Insufficient Balance |
| 2300 | Destination Route Issue |
| 2400 | API Access Not Allowed |
| 3300 | System Error |
| 2000,3000,4000 | Destination Provider Unavailable |
SMS API Codes samples in popular languages.
We have included code samples for sending SMS in PHP, C#, Python, Java, NodeJS etc. Choose your choice of Language from the tabs below to view SMS API Code samples.
<?php
$data = [
'api_key' => 'YOUR_API_KEY',
'msg' => 'Test Message',
'to' => '8801800000000'
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.sms.net.bd/sendsms');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
curl_close($ch);
?>
const axios = require('axios');
axios.post('https://api.sms.net.bd/sendsms', {
api_key: 'YOUR_API_KEY',
msg: 'Test Message',
to: '8801800000000'
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.log(error);
});
fetch('https://api.sms.net.bd/sendsms', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
api_key: 'YOUR_API_KEY',
msg: 'Test Message',
to: '8801800000000'
})
})
.then(res => res.json())
.then(data => console.log(data));
$.ajax({
url: 'https://api.sms.net.bd/sendsms',
type: 'POST',
data: {
api_key: 'YOUR_API_KEY',
msg: 'Test Message',
to: '8801800000000'
},
success: function(response) {
console.log(response);
}
});
import 'package:http/http.dart' as http;
void sendSMS() async {
var response = await http.post(
Uri.parse('https://api.sms.net.bd/sendsms'),
body: {
'api_key': 'YOUR_API_KEY',
'msg': 'Test Message',
'to': '8801800000000'
},
);
print(response.body);
}
import requests
url = "https://api.sms.net.bd/sendsms"
payload = {
"api_key": "YOUR_API_KEY",
"msg": "Test Message",
"to": "8801800000000"
}
response = requests.post(url, data=payload)
print(response.text)
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sms.net.bd/sendsms"))
.POST(HttpRequest.BodyPublishers.ofString(""))
.build();
HttpResponse<String> response =
client.send(
request,
HttpResponse.BodyHandlers.ofString()
);
System.out.println(response.body());
package main
import (
"fmt"
"net/http"
"net/url"
)
func main() {
data := url.Values{}
data.Set("api_key", "YOUR_API_KEY")
data.Set("msg", "Test Message")
data.Set("to", "8801800000000")
response, err := http.PostForm(
"https://api.sms.net.bd/sendsms",
data,
)
if err != nil {
panic(err)
}
fmt.Println(response.Status)
}
val client = OkHttpClient()
val formBody = FormBody.Builder()
.add("api_key", "YOUR_API_KEY")
.add("msg", "Test Message")
.add("to", "8801800000000")
.build()
val request = Request.Builder()
.url("https://api.sms.net.bd/sendsms")
.post(formBody)
.build()
val response = client.newCall(request).execute()
println(response.body?.string())
import Foundation
let url = URL(string: "https://api.sms.net.bd/sendsms")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
let postString =
"api_key=YOUR_API_KEY&msg=Test Message&to=8801800000000"
request.httpBody = postString.data(using: .utf8)
URLSession.shared.dataTask(with: request) {
data, response, error in
if let data = data {
print(String(data: data, encoding: .utf8)!)
}
}.resume()