HTTP SMS Api
HTTP SMS Api
HTTP API
1. Overview
This technical document is intended for developers who wish to use the HTTP API for sending messages, and
describes the various programming methods and commands used by developers when using this API.
The HTTP API is the most popular API, because there are many ways to utilize it for message sending and it
can be used for low or high-volume messaging. As HTTP is a means for relaying information, the HTTP API can
be used with practically any web-service application. This is particularly useful for high- volume message
sending.
2. Introduction
This is one of the simpler server-based forms of communication to our gateway. It can be used either in
the form of a HTTP POST, or as a URL (GET). We recommend POST for larger data transfer, due to the
size limitations of GET. Communication to our API can be done via HTTP on port 80. All calls to the API
must be URL-encoded. The parameter names are case-sensitive. Batch messaging is catered for in a
variety of ways.
3. Getting Started
The following basic information will help you get started with using the interface. The message text
should be URL Encoded. The message should be URL Encoded (also known as percent encoding) string of
UTF-8 characters.
Original text:
Hi Amar!
Happy Diwali to you
Regards,
Encoded text:
Hi%20Amar%21%0AHappy%20Diwali%20to%20you%0ARegards%2C
1|Page
HTTP API SPECIFICATIONS
4. Basic commands
In order to send a message, the system will firstly need to authenticate you as a valid user. The preferred
method of authentication is using username and password.
All other commands are then made up of three segments: authentication, the basic message components
(message content and recipients) and the additional message parameters. In the examples below, we will
include the authentication and basic message components. The additional message parameters will be
included only where they are relevant.
5. Sending Message
User can send a text message using the API. To send a message to a mobile number using API, the
following will be the request using HTTP GET or POST. The parameters can be sent in any order.
URL Syntax
URL Parameters
http://domain/fe/api/v1/send?username={username}&password={password}&unicode={true/false}&from
={from}&to={to}&text={text}&dltContentId=DLTID
Request Parameters:
http://domain/fe/api/v1/send?username={username}&password={password}&unicode={true/false}&from
={from}&to={to}&text={text}&dltContentId=DLTID
HTTP API SPECIFICATIONS
DLTContent
YES
ID Approved Content id
2 |Page
HTTP API SPECIFICATIONS
6. HTTP API Request & Response Details:
{"transactionId":27547042,"state":"SUBMIT_ACCEPTED","description":"Message submitted
successfully","pdu":1}
We suggest you store the response text as it may be required to retrieve status / delivery
report in future using message id.
Response Description
INVALID_SOURCE_ADDRESS Sender ID length != 6 or contains any special characters.
Authentication failure Invalid Username/Password/Account expired
status":500,"error":"Internal Server
Some parameters for request are missing.
Error"
"6001:Insufficient Balance !" Zero Credit
"5001:Template ID is missing" Template ID missing
7: Call Back API Format & Parameter Details for Real Time Delivery Report:
Client has to provide call back api (GET) in below format to configure at the backend, real time delivery reports
shall be pushed through the API.
http://{clienturl
path}?txid={transactionId}&to={recpient}&from={sender}&description={description}&pdu={totalPdu}&
text={message}&deliverystatus={status}&deliverydt={doneDate}
4|Page
HTTP API SPECIFICATIONS
5|Page
HTTP API SPECIFICATIONS
XML API Document
XML One 2 One
<password>password</password>
Password will be available over the panel in the HTTP page.
2. Username
<user>username</user>
<from>SENDER</from>
Is the Sender ID from which message needs to be originated. It should Alphabet
and of 6 characters only.
4. Message Text
<recipient>9999999999</recipient>
Enter the mobile number on which the content to be delivered.
6. Unicode
<unicode>true</unicode>
6|Page
HTTP API SPECIFICATIONS
<?xml version="1.0"?>
<OneToOnePush>
<credentials>
<password>password</password>
<user>username</user>
</credentials>
<from>test</from>
<options>
<templateId>all</templateId>
</options>
<shortMessages>
<message><![CDATA[message text]]></message>
<recipient>9999999999</recipient>
<corelationId>sssssssssssssssssssss</corelationId>
</shortMessages>
<shortMessages>
<message>test1</message>
<recipient>8888888888</recipient>
<corelationId>aaaaaaaaaaa</corelationId>
</shortMessages>
<unicode>false</unicode>
</OneToOnePush>
Response
<PushResponse>
<submitResponses>
<submitResponses>
<transactionId>999924278</transactionId>
<state>SUBMIT_ACCEPTED</state>
<description>Message submitted successfully</description>
<pdu>1</pdu>
<corelationId>sssssssssssssssssssss</corelationId>
</submitResponses>
<submitResponses>
<transactionId>999924279</transactionId>
<state>SUBMIT_ACCEPTED</state>
<description>Message submitted successfully</description>
<pdu>1</pdu>
<corelationId>aaaaaaaaaaa</corelationId>
</submitResponses>
</submitResponses>
</PushResponse>
7|Page
HTTP API SPECIFICATIONS
XML One 2 Many
<password>password</password>
Password will be available over the panel in the HTTP page.
2. Username
<user>username</user>
Username will be available over the panel in the HTTP page. For Promotional
user name use the demo.pro and for transactional messages use demo.trans
3. Sender ID
<from>SENDER</from>
Is the Sender ID from which message needs to be originated. It should Alphabet
and of 6 characters only.
4. Message Text
<recipient>9999999990</recipient>
8|Page
HTTP API SPECIFICATIONS
<recipient>9999999991</recipient>
<recipient>9999999992</recipient>
Enter the mobile number on which the content to be delivered. In case
o
f multiple mobile numbers enter mobile numbers in new row.
6. Unicode
<unicode>true</unicode>
<?xml version="1.0"?>
<OneToManyPush>
<credentials>
<password><password></password>
<user><username></user>
</credentials>
<from><Sender ID></from>
<message><Registered></message>
<options>
<templateId>all</templateId>
</options>
<recpients>
<corelationId>hgfg</corelationId>
<mobile>1111111111</mobile>
</recpients>
<recpients>
<corelationId>hgfg</corelationId>
<mobile>2222222222</mobile>
</recpients>
<unicode>false</unicode>
</OneToManyPush>
Response
<PushResponse>
<submitResponses>
<submitResponses>
<transactionId>863147912</transactionId>
<state>SUBMIT_FAILED</state>
<description>4011:Number found in DnD bases</description>
<pdu>0</pdu>
<corelationId>test3</corelationId>
</submitResponses>
<submitResponses>
<transactionId>863147911</transactionId>
<state>SUBMIT_FAILED</state>
<description>4031:Number found in user blacklist</description>
<pdu>0</pdu>
<corelationId>test2</corelationId>
</submitResponses>
<submitResponses>
<transactionId>863147910</transactionId>
<state>SUBMIT_ACCEPTED</state>
<description>Message submitted successfully</description>
<pdu>1</pdu>
<corelationId>test1</corelationId>
</submitResponses>
<submitResponses>
9|Page
HTTP API SPECIFICATIONS
<transactionId>863147913</transactionId>
10 | P a g e
HTTP API SPECIFICATIONS
<state>INVALID_MSISDN</state>
<description>4005:Invalid Msisdn [4747872727] for country [IN]</description>
<pdu>1</pdu>
<corelationId>test4</corelationId>
</submitResponses>
<submitResponses>
<transactionId>863147914</transactionId>
<state>INVALID_MSISDN</state>
<description>4005:Invalid Msisdn [124774774] for country [IN]</description>
<pdu>1</pdu>
<corelationId>test5</corelationId>
</submitResponses>
</submitResponses>
</PushResponse>
11 | P a g e
HTTP API SPECIFICATIONS
<password>Password</password>
<user>username</user>
</credentials>
<from>Sender ID</from>
<messageText>text message</messageText>
<options>
<a>b</a>
<templateId>Template ID</templateId>
</options>
<options>
<dltPrincipalEntityId>2222222222222</dltPrincipalEntityId>
<dltContentId>1234</dltContentId>
</options>
<recpients>
<corelationId>ID</corelationId>
<mobile>Mobile Number 1</mobile>
</recpients>
<recpients>
<corelationId>ID</corelationId>
<mobile>Mobile Number 2</mobile>
</recpients>
<recpients>
<corelationId>ID</corelationId>
<mobile>Mobile Number 3</mobile>
</recpients>
<unicode>true</unicode>
</OneToManyPush>
' 'https://domain/fe/api/v1/one2One'
12 | P a g e