Developers

Bulk SMS HTTP API Specifications :

SMS Messaging

https://api.bulksmsonline.com:9090/smsapi?username=XXXX&password=YYYYY&type=Y&to=0000000000&source=sender&message=YourText

Explanation of all parameters are below. So, note that all the parameters, especially message and URL should be URL-UTF-8 encoded.

Parameters

PresenceParameterDescription
MandatoryusernameThe username of your account.
MandatorypasswordThe password of your account.
MandatorytypeMessage type to indicate if the message is text, Unicode, flash etc
t : Message to be sent. Must be URL encoded (GSM 3.38 Character
encoding)
tf : Flash (GSM 3.38 Character encoding)
u : Unicode messages such as Chinese or Arabic
uf: Unicode Flash messages such as Chinese or Arabic
MandatorytoOne or more phone numbers, separated by comma.
MandatorysourceThe sender name that should appear from.
• Max Length 18 numeric.
• Max Length 11 alphanumeric.
Additional restrictions on this field may be enforced by the SMSC.
MandatorymessageThe body of the SMS message.
Sending Unicode messages such as Chinese or Arabic, needs to have the text encoded in UTF-16BE
OptionalscheduledTo schedule the message to be sent sometime/date in the future. Time/Date format is: “yyyy-mm-dd hh:mm:ss” which must be URL encoded. - The time must be in GMT

Response

Sr.No.Error CodeDescription
1OK |MESSAGE IDSuccess, Message Submitted Successfully. In this case you will receive the response OK|<MESSAGE ID>. The message Id can then be used later to map the delivery reports to this message.
2E0002Invalid URL. This means that one of the parameters was not provided or left blank.
3E0003Invalid username or password parameter.
4E0004Invalid type parameter.
5E0005Invalid message.
6E0006Invalid TO number.
7E0007Invalid source (Sender name).
8E0008Authentication failed.
9E0010Internal server error.
10E0022Insufficient credit.
11E0033If more than 30 API request per second throughput restriction by default
12E0044mobile network not supported

Note
Along with the above error’s codes, standard SMPP v3.4 error codes may also return where applicable.

Example to send text SMS Messaging (GSM 03.38-character set)

https://api.bulksmsonline.com:9090/smsapi?username=XXXX&password=YYYYY&type=t&to=00000000&source=xxxxxxx&message=Test%20Message!!!

The following observations can be made in the above URL:

  • ‘type=0’, indicates this is a message of type plain text. So, this mode supports all characters falling under the GSM 03.38 character set.
  • ‘message=Test%20Message!!!’. The message field contains the content to send in an URL encoded format. On using the appropriate username and password in the above link you will get the ‘Test Message!!!’ on your mobile phone.
  • ‘to=%2Bxxxxxxx’. There is an inclution of an optional plus in the to field here. Do note that the ‘+’ sign is URL encoded.

Example to send Unicode SMS Messaging

https://api.bulksmsonline.com:9090/smsapi?username=XXXX&password=YYYYY&type=u&to=00000000&source=xxxxxxxx&message= 00620075006C006B0073006D0073006F006E006C0069006E0065

On calling the above link by replacing the username and password by your account credentials. Meanwhile, you should get the SMS ‘Test Message!!!’ on the mobile number in the to field.
In short, encode of the message on the UTF-16BE format and the type parameter has to be set to 6 i.e. (type=u).

Example to send schedule SMS Messaging

https://api.bulksmsonline.com:9090/smsapi?username=XXXX&password=YYYYY&type=t&to=00000000&source=xxxxxxxx&message=TestMessage&Scheduled=2020-01-08T05:54:00

It is possible to schedule delivery of a message to be sent at a specified date and time in the future. Certainly, this is done by using the Scheduled parameter in your request. So, Time/Date format is: “yyyy-mm-dd hh:mm:ss”

SMPP API SMS Messaging

For our customers that require low level control of SMS messaging and lowest possible latency, we offer our Enhanced SMPP service

Therefore, you need to reach out to our support team to get your credentials whitelist to use this service.

This document provides a reference for all features available to you via the SMPP interface for sending SMS. Most importantly, SMPP is the industry standard for sending SMS to Network providers and is our native protocol.

Telecommunications industry uses the Short Message Peer-to-Peer (SMPP) as a protocol for exchanging SMS messages between Short Message Service Centers (SMSC) and/or External Short Messaging Entities (ESME).

The protocol is a level-7 TCP/IP protocol, which allows fast delivery of SMS messages.

The most commonly use versions of SMPP are v3.3. Moreover, the most widely supportive standard, and v3.4, which adds transceiver support (single connections that can send and receive messages). Subsequently, data exchange may be synchronous, where each peer must wait for a response for each PDU being sent.

Furthermore asynchronous, where multiple requests can be issued in one go and acknowledged in a skew order by the other peer.
  • SMPP is a direct connection to carriers and routes sources and provides instant delivery
  • High throughput (up to 60 msgs/second)
  • Usage of Short Code
  • SMPP offers status delivery reports
  • 24/7 support via our support system

 

Outbound SMS SMPP

SMPP account details

Hostsmpp.bulksmsonline.com
Port8889
Username\<system-id\>
Password \<password\>

 

Maximum instances (binds):

Default 2 per SMPP account. For more connections, please contact your account manager.

 

IP Access:

To access our SMPP server the client IP range announcement and addition is must to our Firewalls.

Therefore, please contact our support.

 

Supported SMPP PDUs:

 

SMPP PDU types
bind_transmitter / bind_transmitter_resp
bind_receiver/ bind_receiver_resp
bind_transceiver / bind_transceiver_resp
enquire_link / enquire_link _resp
unbind / unbind_resp
submit_sm / submit_sm_resp
data_sm / data_sm_resp
deliver_sm / deliver_sm_resp
generic_nack
query_sm / query_sm_resp
cancel_sm / cancel_sm_resp
replace_sm / replace_sm_resp

Defination of the Type of source address by the source address TON and NPI parameters.

Moreover, the alphanumeric sender has limit and a maximum length of 11 characters

 

MSISDN Format:

MSISDN sender maximum length is 18

In GSM, MSISDN is built up as:

MSISDNCC + NDC + SN
CCCountry Code
NDCNational Destination Code
SNSubscriber Number

Throughput and throttling:

Throughput is the maximum number of MT messages per second that can be sent from the SMPP account to our servers Default value is 10 per bind. So, to increase the value, contact your account manager.

Certainly, the recommended default window size (maximum open requests) is 5.

In short, the restriction of the throughput by the capacity of the operator receiving the MT messages.

 

Enquire link:

Our recommendation is to set your enquire_link requests to 60 seconds.

 

Time Zone:

Bulksmsonline SMSC uses UTC (Universal Time Coordination)

 

Submitting Messages

Submission Types:

Submission of messages may with either submit_sm or data_sm, using either the

short_message or message_payload fields. The message length may not exceed the

byte limit for the network that the message is being sent to (for example 140 bytes

on GSM networks).

Support of concatenated messages by using the User Data Header (UDH), which include in the message size byte limit.

 

Submit Responses:

A positive response to a ‘submit’ will contain an error code of zero and a non-null message reference.

A negative response will contain a vendor specific error code.

Hex ValueDecimalDescription
0x000000C5-0x000000FD
0x000000000No Error
0x000000011Message length is invalid
0x000000022Command length is invalid
0x000000033Invalid Command ID
0x000000044Incorrect BIND Status for given command
0x000000055ESME Already in Bound State
0x000000066Invalid Priority Flag
0x000000077Invalid Registered Delivery Flag
0x000000088System Error
0x00000009Reserved
0x0000000A10Invalid Source Address
0x0000000B11Invalid Dest Addr
0x0000000C12Message ID is invalid
0x0000000D13Bind Failed
0x0000000E14Invalid Password
0x0000000F15Invalid System ID
0x0000001016Reserved
0x0000001117Cancel SM Failed
0x00000012Reserved
0x0000001319Replace SM Failed
0x0000001420Message Queue Full
0x0000001521Invalid Service Type
0x00000016Reserved thru -0x00000032
0x0000003351Invalid number of destinations
0x0000003452Invalid Distribution List name
0x0000003553Reserved thru -0x0000003F
0x0000004064Destination flag is invalid (submit_multi)
0x00000041Reserved
0x0000004266Invalid submit with replace request; submit_sm with replace_if_present_flag set
0x0000004367Invalid esm_class field data
0x0000004468Cannot Submit to Distribution List
0x0000004569submit_sm or submit_multi failed
0x00000046Reserved thru -0x00000047
0x0000004872Invalid Source address TON
0x0000004973Invalid Source address NPI
0x0000005080Invalid Destination address TON
0x0000005181Invalid Destination address NPI
0x00000052Reserved
0x0000005383Invalid system_type field
0x0000005484Invalid replace_if_present flag.
0x0000005585Invalid number of messages
0x00000056Reserved thru -0x00000057
0x0000005888Throttling error; ESME has exceeded allowed message limits.
0x0000005989Reserved thru -0x00000060
0x0000006197Invalid Scheduled Delivery Time
0x0000006298Invalid message validity period (Expiry time).
0x0000006399Predefined Message Invalid or Not Found
0x00000064100ESME Receiver Temporary App Error Code
0x00000065101ESME Receiver Permanent App Error Code
0x00000066102ESME Receiver Reject Message Error Code
0x00000067103query_sm request failed
0x00000068104Reserved thru -0x000000BF
0x000000C0192Error in the optional part of the PDU Body
0x000000C1193Optional Parameter not allowed
0x000000C2194Invalid Parameter Length
0x000000C3195Expected Optional Parameter missing.
0x000000C4196Invalid Optional Parameter Value
0x000000FE245Delivery Failure, used for data_sm_resp
0x000000FF255Unknown Error
0x00000100Reserved for SMPP extension thru -0x000003FF

Delivery Reports:

Our SMPP will return a delivery report (Intermediate and/or final depending on the route the client will have to connect to SMPP server in the receiver or transceiver mode.

StatusDescription
DELIVRDMessage delivered to handset
FAILEDMessage could not be delivered
EXPIREDMessage validity period expired, before any successful tries of submission
UNDELIVMessage is Undeliverable
REJECTDMessage REJECTD

Restful API SMS Messaging

The most feature and rich API that Bulksmsonline.com offers is the SMS REST API. Single messages, scheduled batch send-outs, using message templates and more.

Overview

RESTful API is ideal for the programmatic sending of SMS, regardless of volume. Developers wanting a more extensive integration solution will find that this API perfectly caters to their programmatic sending needs. The API is designed using RESTful standards over HTTP and accepts JSON data.

Required Knowledge
If you plan on using the API you should be familiar with the following:

  • JSON
  • HTTP
  • REST
Base URL

The base URL for the API is https://restapi.bulksmsonline.com/ and supports HTTPS. To access a specific version of the API, simply postfix the URL with the version of the API, as in the case of https://restapi.bulksmsonline.com/rest/api/v1 .
The base URL will always be set to use the latest version of the API. However, in order to reduce the chance of compatibility issues, always reference the version you are developing against in the URL.

API Access

To use the API you must use your account username and password to generate a temporary token (See Authentication Tokens) and include the token in HTTP requests. This mechanism minimises the risk of compromising your API credentials.
With the prerequisites completed, you can now start using the API. The following sections of this guide will briefly explain the available features of the REST API. For technical details about the HTTP request and response objects for each function, please refer to the following documentation.

Introduction

The REST Messaging API is designed to be a simple and powerful tool for large scale messaging with features such as:

  • Use a convenient HTTP interface.
  • Use a convenient HTTP interface.
  • Organize your frequent recipients into groups.
  • Send messages at a later time with scheduling.
  • Customize your message for each recipient using parameterization.
  • Automatic default originator selection support for messages without originator.
Service Token

To use the REST API you first need to create an HTTP REST Token. You can have multiple service tokens and each one will see their messages, groups or other resources isolated from each other.

Authentication

You will be provided with an authentication token for each service request.
The token is sent in the Authorization header preceded by Bearer. It is required for all requests made to the REST API.

Base URL to Generate Token

https://restapi.bulksmsonline.com/rest/api/v1/sms/gettoken/username/YourUsername/password/YourPassword

Example request with token to send a SMS

Base URL to send sms
The following URLs can be used by the REST API. We have servers in the US and Singapore.

https://restapi.bulksmsonline.com/rest/api/v1/sms/send

Rate Limits

The rate limit is calculated from all messages sent via the API, so a batch with 15 recipients will count as 15 messages for rate limiting purposes.
This means that new batches will be accepted immediately but might be delayed if earlier batches are still on queue.

SMS REST formats

This section will take a brief look at some of the formats used in the REST API.

JSON

JSON (application/json) is the content type of both requests and responses if not otherwise specified.
Requests with invalid JSON will be rejected.
Null values can be omitted in requests and will be omitted in responses. In some cases explicitly setting null will overwrite a previously set value with null. See Update a group for an example.

MSISDN

Only MSISDNs in international format are accepted by the API.
MSISDNs can be sent in with or without a leading + (i.e. +123456789 or 123456789) and without a leading 00. Any space, dash or bracket will also be ignored by the API.
All MSISDNs returned by the REST API will be without a + or 00 prefix, even if they were sent in with one.

 

SMS REQUEST OBJECT PARAMETER
{
   from           string
                  nullable: true
   to             [
                  nullable: true
                  string]
   type           stringEnum:
                  [ Text, FlashText, UniCode, UniCodeFlash ]
   content        string
                  nullable: true
   sendDateTime   string($date-time)
                  nullable: true
}
HTTP Status Codes

The REST API returns an HTTP status and code each time a request is made.

Get Token HTTP Statuses

The following HTTP status codes are used by the API. Additional codes might be added in the future and if you encounter a code not in this list please consult the HTTP specification for a definition.

StatusDescription
200 OKSuccess - Returns the newly created token
401 UnauthorizedUnauthorized - If the credentials provided are wrong
402 Payment RequiredPayment Required - If the account has 0 balance or expired
402 Payment RequiredForbidden - If the request has invalid actions
404 Not FoundInvalid path
405Method Not Allowed
500 Internal Server ErrorInternal Server Error
503 Service UnavailableService Unavailable
Send SMS Status codes

The following codes can be returned as values for the code field:

HTTP StatusCodeDescription
200SuccessSent SMS
400Bad RequestInvalid Parameters
401UnauthorizedInvalid Token
404Not Foundinvalid path
405-Method Not Allowed
500-Internal Server Error
503-Service Unavailable


Web SMS Platform Introduction

 

Real-time statistics

Customers who opened, replied, clicked and even received and interacted with your campaign

Safe spending and Pricing

Pay only for what you need with a clear prices and no monthly commitment

Why Use Web SMS Platform?

    1. Speed
    2. Realibility
    3. Universal
    4. Two-way SMS

The automated web SMS platform service enables the auto-reply, keyword triggers, and auto opt-outs feature for the benefits of the SMS sending company.

Explore the solutions we provide:

    1. Automate response to all incoming customer messages
    2. Select the delivery route as per preferences
    3. Receive notifications when your credits need a check
    4. View & download delivery reports
    5. Send English/Unicode messages

Introduction of MNP Lookup

MNP — provides information about mobile number roaming and portability. As a result, it simplifies the entire mobile number portability process. So, it is allowing you to manage all messaging activities effectively.

Bulk SMS Online MNP Lookup Service allows you to clean your database giving a brand new and correct information about mobile number portability. Therefore, it’s ideal for SMS aggregators, banking, insurance and financial institutions, IT and online services.

 

Save Your Costs

Bulk SMS Online MNP helps you reduce unnecessary costs occurring when you send texts to invalid mobile numbers or wrong operator. Consequently, such costs can be massive. Therefore, when you send quantities of SMS. On the other hand, with our MNP Lookup service, your texts will go only to the right users!

Calling Restful API using C# .Net

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''' 
' :: How to generate Token in C# using our Restful API
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''' 
var client              = new RestClient("https://restapi.bulksmsonline.com/rest/api/v1/sms/gettoken/username/YOURUSERNAME/password/YOURPASSWORD");
var request             = new RestRequest(Method.GET);
IRestResponse response  = client.Execute(request);

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''' 
' ::: How to send sms with your generated Token
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''' 

var client  = new RestClient("https://restapi.bulksmsonline.com/rest/api/v1/sms/send");
var request = new RestRequest(Method.POST);

request.AddHeader("content-type", "application/json");
request.AddHeader("token", "USER TOKEN GENERATED FROM GET TOKEN API");

request.AddParameter(
    "application/json",
    "{\"from\":\"Sender Name\",\"to\":[\"16813000014\",\"16813000014\"],\"type\":\"Text\",\"content\":\"Sample SMS Content To Be Sent\"}",
    ParameterType.RequestBody);

IRestResponse response = client.Execute(request);\

Calling Restful API using PHP

/* 
* :: How to generate Token in PHP using our Restful API
*/ 
   "https://restapi.bulksmsonline.com/rest/api/v1/sms/gettoken/username/YOURUSERNAME/password/YOURPASSWORD",
  CURLOPT_RETURNTRANSFER  => true,
  CURLOPT_ENCODING        => "",
  CURLOPT_MAXREDIRS       => 10,
  CURLOPT_TIMEOUT         => 30,
  CURLOPT_HTTP_VERSION    => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST   => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
/* 
* ::: How to send sms with your generated Token
*/

 "https://restapi.bulksmsonline.com/rest/api/v1/sms/send",
  CURLOPT_RETURNTRANSFER    => true,
  CURLOPT_ENCODING          => "",
  CURLOPT_MAXREDIRS         => 10,
  CURLOPT_TIMEOUT           => 30,
  CURLOPT_HTTP_VERSION      => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST     => "POST",
  CURLOPT_POSTFIELDS        => "{\"from\":\"Sender Name\",\"to\":[\"16813000014\",\"16813000014\"],\"type\":\"Text\",\"content\":\"Sample SMS Content To Be Sent\"}",
  CURLOPT_HTTPHEADER        => array(
                                "token : USER TOKEN GENERATED FROM GET TOKEN API",
                                "content-type: application/json"
                            ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}


Calling Restful API using Java

/** 
* :: How to generate Token in JAVA using our Restful API
**/
OkHttpClient client = new OkHttpClient();

Request request     = new Request.Builder()
  .url("https://restapi.bulksmsonline.com/rest/api/v1/sms/gettoken/username/YOURUSERNAME/password/YOURPASSWORD")
  .get()
  .build();

Response response   = client.newCall(request).execute();

/** 
* ::: How to send sms with your generated Token
**/

OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(
    mediaType,
    "{\"from\":\"Sender Name\",\"to\":[\"16813000014\",\"16813000014\"],\"type\":\"Text\",\"content\":\"Sample SMS Content To Be Sent\"}"
    );
Request request = new Request.Builder()
  .url("https://restapi.bulksmsonline.com/rest/api/v1/sms/send")
  .post(body)
  .addHeader("token", "USER TOKEN GENERATED FROM GET TOKEN API")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();

Expand your business today!