Developer API

Send SMS via SMPP, HTTP or HTTPS SMS API, in XML or JSON

SMSing.app put at your disposal sample codes so you can integrate and use our cutting edge sms platform faster and easier. Cut & Paste the SMS API Code & Start Texting in Minutes. Signing up is easy and you’ll be up and running in no time at all. Click here for full documentation. https://smsing.docs.apiary.io

Endpoint: https://smsing.cloud//api/v2/SendSMS
PHP
$url = 'https://smsing.cloud//api/v2/SendSMS';
$fields = array('apikey' => $api_key,
'from' => $from,
'to' => $to,
'message' => $message,
'rotate' => $rotate,
);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($fields));
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
$result = curl_exec($ch);
return $result;
GET
BASH
curl -X POST https://smsing.cloud//api/v2/SendSMS \
    --data-urlencode from='12345670987' \
    --data-urlencode to='331234567890' \
    --data-urlencode message='Hello world' \
     -d apikey=yourkey
https://smsing.cloud//api/v2/SendSMS?apikey={api_key}
&from={from}
&to={to}
&message={message}
&rotate={rotate}
PYTHON
import requests

resp = requests.post('https://smsing.cloud//api/v2/SendSMS', {
apikey: 'yourkey',
from: '1234567890',
to: '331234567889',
message: 'OTP 3456',
})
print(resp.json())
JAVASCRIPT
RUBY
fetch('https://smsing.cloud/apis/smsgroup/, {
  method: 'post',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    apikey: 'yourkey',
    from: '1234567890',
    to: '331234567889',
    message: 'OTP 3456',
  }),
}).then(response => {
  return response.json();
}).then(data => {
  console.log(data);
});
require 'net/http'
require 'uri'

uri = URI.parse("https://smsing.cloud//api/v2/SendSMS")
Net::HTTP.post_form(uri, {
    apikey => 'yourkey',
    from => '1234567890',
    to => '331234567889',
    message => 'OTP 3456',
})
NODE
C#
using System;
using System.Collections.Specialized;
using System.Net;

using (WebClient client = new WebClient())
{
  byte[] response = client.UploadValues("https://smsing.cloud//api/v2/SendSMS", new NameValueCollection() {
    { "apikey", "yourkey" },
    { "from", "123456789" },
    { "to", "33123456789" },
    { "message", "Hello world" },
  });

  string result = System.Text.Encoding.UTF8.GetString(response);
}
// Using request
const request = require('request');
request.post('https://smsing.cloud//api/v2/SendSMS', {
  form: {
    apikey: 'yourkey',
    from: '1234567890',
    to: '331234567889',
    message: 'OTP 3456',
  },
}, (err, httpResponse, body) => {
  console.log(JSON.parse(body));
});

// Using axios
const axios = require('axios');
axios.post('https://smsing.cloud/apis/smsgroup/', {
    apikey: 'yourkey',
    from: '1234567890',
    to: '331234567889',
    message: 'OTP 3456',
}).then(response => {
  console.log(response.data);
})

Response

Example API Response (data is returned in universal and lightweight JSON format)
{
"status":"-4",
"msg":"There was no message passed in to be sent."
}

Parameters

apikey
(Required) The API key of your account.
from
(Required) The number you are sending from. Could be any SMS-enabled number in your account.
to

(Required) The group name you are sending the message to. Must be a valid group name that exists in your group list.

message

(Required) The message text you are sending. 1 credit is charged for each 160 character segment. If you have a message that is 300 characters, and you are sending to 10 people, 20 credits will be deducted (2 credits for each person).

NOTE: Messages containing non-GSM(unicode) characters will be charged 1 credit for each 70 character segment.

alphasender

(Optional) This is the alphanumeric sender ID you want to send the message from. Only certain countries can send from an alphanumeric sender id.

Alphanumeric SenderID requirements: Any combination of 1 to 11 letters(A-Z/a-z) and numbers(0-9). 1 letter and no more than 11 alphanumeric characters may be used.

rotate(Optional) Flag if you want to rotate through all your numbers in your account when sending the message. Set to 1 if you want to rotate. If nothing is passed in, it will NOT rotate through your numbers.
throttle(Optional) Sending throttle to control the sending rate of the message being sent. The default is 1, which will send the message at a rate of 1 SMS every 1 second per long code. If nothing is passed in, it will send at this rate. If you want to send a slower rate, you can pass in a 2, 3, 4, 5 or 6 which will send at a rate of 1 SMS every 2 seconds per long code, every 3 seconds, etc…The slowest setting which can be used is 6.
sendondate

(Optional) If scheduling bulk SMS, this is the date/time message will be sent. If it’s a recurring event, this is the 1st date/time in the series.

Format: DD-MM-YYYY HH:MM
Example: 20-03-2017 19:30

recurring(Optional) Create recurring events. Set to 1 if you want to create a recurring event.
repeat(Optional) Type of recurring event you want to schedule. Valid values are ‘Daily’, ‘Weekly’, ‘Monthly’, ‘Yearly’.
frequency(Optional) How often you want the recurring events to happen based on the Repeat parameter above. For example, if you pass in ‘Daily’ for repeat and ‘3’ for Frequency, it will schedule the events every 3 days. Valid values are 1-30.
enddate

(Optional) End date you want the recurring events to end. For example, if you pass in a sendondate(start date) of Oct 10 at 6:30 and you want the last event to run on Nov 10, you must pass in an end date of Nov 10 at 6:30 so Nov 10 will be included as the last date.

Format: DD-MM-YYYY HH:MM
Example: 20-03-2017 19:30

Return Values

0 or group SMS ID
0 is passed back on successful API call when scheduling bulk SMS. The group SMS ID will be passed back on successful API call when sending bulk SMS immediately.
-1
Invalid API key passed in.
-2
There was no ‘from’ number passed in.
-3
The ‘from’ number passed in doesn’t exist in your account or isn’t SMS-enabled.
-4
There was no message passed in to be sent.
-5
There was no group passed in.
-6
The group passed in is invalid or does not exist.
-7

The alphanumeric sender ID passed in is either invalid(doesn’t match requirements below) OR the user account does not have permission to send from an alphanumeric sender ID.
Requirements: You may use any combination of 1 to 11 letters(A-Z/a-z) and numbers(0-9). 1 letter and no more than 11 alphanumeric characters may be used.

-8
The rotate flag passed in is invalid. Proper values are either 1 or 0.
-9
The sending throttle flag passed is invalid. Proper values are 1, 2, 3, 4, 5, or 6.
-10
The recurring flag passed in is invalid. Proper values are either 1 or 0.
-11
The repeat parameter passed in is invalid. Proper values are ‘Daily’, ‘Weekly’, ‘Monthly’, ‘Yearly’. Also, if recurring flag is 1 and nothing passed in for this field will trip this error.
-12
The frequency parameter passed in is invalid. Proper values are 1-30. Also, if recurring flag is 1 and nothing passed in for this field will trip this error.
-13
Must have a recurring end date if you want to schedule a recurring event. The recurring flag is 1 and nothing passed in for enddate.
-14
Not enough credits to send the message.
-15
No subscribers found in group.
-16
Other error.
-20
Level 1 does not have access to the API. API can only be used with Levels 2, 3, and 4.

 

Search here...

Cloud SMS and voice Platform for mobile network operators, sms aggregators, OTTs, retailers and enterprises. With high throughput capacity and low delivery latency.

Contact Us