Developer Resources


What Interface Are You Using?
What Developer Language Do You Use?
Email SMS API
Use this API to send SMS via email.
- Automatic conversion from email into SMS
- IP or password authentication
- Send multiple SMS per email
- Replies to email or cell phone
Example:
To: 0410123456@mail.completesms.net
From: sms-alerts@company.com
Subject: Alert!
Body:
[SENDER]
ID=CI00012345
PW=password
Message:
Server 23 is offline.
SMS HTTP API
Use our SMS API to send SMS via HTTPS connections from your application. The SMS API is simple but powerful, building in the functionality to send and receive SMS into your existing application. Documentation on all the API parameters with examples of full request and response objects can be found here.
Features
- Encrypted communication with SSL
- Replies from SMS recipients arrive to you as either or both Email and SMS, or HTTP callback
- Delivery status receipts via Email or HTTP callback
- Multiple recipients per request
- Ability to schedule messages in the future
Developer Languages
Node.JS
const body = {
Name: ‘ROX_API_Request’,
Version: ‘1.1.1’,
Product: ‘MyApplication’,
Sender: {
AccountId: ‘CI00123456’,
Username: ‘user.email@domain.com’,
Password: ‘password’,
},
Messages: {
ReceiptFlag: 0,
ReplyType: ‘E’,
TimeZoneOffset: -600,
Count: 1,
SMS: [
{
DestTn: ‘+61411222333’,
DestName: ‘John’,
DestEmail: ‘john.doe@email.com’,
SMSText: ‘My sms message.’,
},
],
},
};
const headers = new Headers({
‘Content-Type’: ‘application/json’,
});
const options = {
method: ‘POST’,
headers: headers,
body: JSON.stringify(body),
};
fetch(‘https://api.completesms.net/smsapi/send’, options)
.then((response) => response.json())
.then((parsed) => {
console.log(parsed);
})
.catch((err) => {
console.error(err);
});
Python
import requests
body = {
“Name”: “ROX_API_Request”,
“Version”: “1.1.1”,
“Product”: “MyApplication”,
“Sender”: {
“AccountId”: “CI00123456”,
“Username”: “user.email@domain.com”,
“Password”: “password”,
},
“Messages”: {
“ReceiptFlag”: 0,
“ReplyType”: “E”,
“TimeZoneOffset”: -600,
“Count”: 1,
“SMS”: [
{
“DestTn”: “+61411222333”,
“DestName”: “John”,
“DestEmail”: “john.doe@email.com”,
“SMSText”: “My sms message.”,
},
],
},
}
response = requests.post(“https://api.completesms.net/smsapi/send”, json=body)
print(response.status_code)
print(response.json())
PHP
“ROX_API_Request”,
“Version” => “1.1.1”,
“Product” => “MyApplication”,
“Sender” => [
“AccountId” => “CI00123456”,
“Username” => “user.email@domain.com”,
“Password” => “password”,
],
“Messages” => [
“ReceiptFlag” => 0,
“ReplyType” => “E”,
“TimeZoneOffset” => -600,
“Count” => 1,
“SMS” => [
[
“DestTn” => “+61411222333”,
“DestName” => “John”,
“DestEmail” => “john.doe@email.com”,
“SMSText” => “My sms message.”,
],
],
],
];
$content = json_encode($body);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER,
array(“Content-type: application/json”));
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
$json_response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($status >= 200 && $status < 300) {
echo $response;
echo $json_response;
} else {
echo $json_response;
echo "Error: $status\n";