Bulksms API Documentation: Created By: Netcore Solutions Pvt. LTD ©
Bulksms API Documentation: Created By: Netcore Solutions Pvt. LTD ©
API
Documentation
CONTENTS
Introduction 4
1.1 Purpose 4
1.2 Audience 4
1.3 Acronyms and Abbreviations 4
1.4 Contact Details 5
Chapter 2 6
2.1 Chapter Overview 6
2.2 Mobile number guidelines in API usage 6
2.3 Choice between IP address & mobile number authentication 6
2.3.1 White listing client public IP addresses – 6
2.3.2 Mobile number & password authentication. 6
2.4 SMS Header and Footer 7
2.5 API in Asynchronous mode 7
2.6 Message Types 8
2.7 How to send UDH (port based) Message 9
2.7.1 UDH Octet parameter details 10
2.7.2 Send Message to a port number with more than 140 bytes, 11
2.7.3 How to encode Binary message 12
2.8 API Parameters 12
2.9 API Responses 14
2.10 Single Message API 19
2.10.1 Using GET method 19
2.10.2 Using POST method 20
2
BulkSMS API Documentation
Chapter 3 44
3
BulkSMS API Documentation
Introduction
1.1 Purpose
● This document provides a description of the Bulk push API usage for end-users .
● This document also describes the API for collecting delivery reports as well.
1.2 Audience
Enterprises who wish to integrate existing software systems with netcore’s BulkSMS API
Acronym Explanation
IP Internet Protocol
4
BulkSMS API Documentation
5
BulkSMS API Documentation
Chapter 2
2.1 Chapter Overview
This chapter contains an overview of nectore’s BulkSMS API.
6
BulkSMS API Documentation
● The account details with the password will be shared with you by customer support team.
2.4 SMS Header and Footer
● Messages may need to be sent out with a fixed header and/ or footer in some cases. For instance, an Enterprise would
want all messages to be signed-off with their name or all offers with Terms of Service/ Use. SMS Header and footer
settings can be used for help in this regard.
● If the header is set, all messages sent will be prefixed with the header content. Similarly, if the footer is set, all messages
sent out via the API will end with the footer content.
● For e.g : We have set the header of the message as ‗Dear Customer,‘ and the footer of the message as ‗Happy
Shopping!‘. If the message text: ‗We have come up with a special offer for all our customer with a flat discount of 50%
and more T&C apply. Visit your nearest store.‘ is specified in the API call, the message to the end recipient will be sent
out as: ‗Dear Customer, We have come up with a special offer for all our customer with a flat discount of 50% and more
T&C apply. Visit your nearest store. Happy Shopping!‘. The Header and Footer can be set from the BizBond dashboard
from Keyword -> Message Customization
7
BulkSMS API Documentation
MULTILINGUAL 2 No No Yes
VCARD 11 No No yes
Flash No No Yes
12 (English); 15
(Multilingual)
UDH 13 or 14 ( see UDH Yes No Yes (optional)
message type below )
8
BulkSMS API Documentation
Parameter Description
text Text that needs to be sent on mobile handset. In case of binary content, see 'how to encode
binary message'.
● Step 1 :
Prepare the UDH byte value with message size less than 140 byte, where application running on 5000
port.(hex value
of 5000 = 1388)
06 05 04 13 88 00 00
9
BulkSMS API Documentation
%2506%2505%2504%2513%2588%2500%2500
Octet Number
Value Description
10
BulkSMS API Documentation
2.7.2 Send Message to a port number with more than 140 bytes,
need to add concatenated message header information
6-7 00 00 Information Element Data (octets 6 & 7 -> 0000 - originator port)
10 2
Information Element Data (concatenated short message reference number)
11
BulkSMS API Documentation
For more details about different octet in UDH header, Plz refer netcore's API document Table 2.2 & 2.3 section.
Note: To send normal text App running on destination port should be able to read ASCII characters. If app understands
binary then message must be in binary encoded rather normal text.
Parameter Description
This is the unique identifier representing the channel owned by the enterprise/ the
feedid Account ID
Username It is the 10-digit Mobile Number. This is optional parameter as explained in Section 2.2.
It is the password will be received by SMS after getting registered on our platform. This
Password is an optional parameter, mandatory only when the username is provided.
12
BulkSMS API Documentation
Make sure that the time is specified in the correct format – yyyymmddhhmm. If time is
not specified message will go immediately. If time is specified in wrong format it won’t
go out. If time parameter is empty or past time is mentioned then message will go
Time immediately.
Using Sender-id is Optional. If there are single or multiple
sender-ids then all the sender-ids have to be validated. For one message only one sender
ID can be used. In case no Sender ID is mentioned in the API call then the default sender
ID is attached to the message. Please speak with your account manager to set the
senderid default sender ID for your account .
Using mtype to indicate the type of message being sent is optional. The default setting is
to send text message. Use mtype as outlined in Section 2.8 (1 – text; 5 – WAP; 8 –
mtype Picture message; 13 – UDH)
URL parameter needs to be specified for WAP Push type messages only. Send the WAP
url URL in this parameter
The data header for UDH Type messages can be specified in this parameter, if message
udh type UDH is chosen.
This is an optional parameter The name of the campaign can be provided in this
jobname parameter. It is used for future reference
templateid This is the Id registered with TRAI for template which you are using in SMS
If SMS contains URL which needs to be shortened short=1 needs to be passed (Settings
short should be available to your account for shortening long URL)
13
BulkSMS API Documentation
101 XML MALFORMED REQUEST XML XML does not match with required DTD
MALFORMED.
The end-tag for
element type
"TEXT" must
end with a
'>' delimiter.
102 Client < Account ID> is not REQUEST Client 18888 is If the Account id
registered not registered for the Client is not registered with MyToday
103 Login failed REQUEST Invalid login information entered
107 Message Id not unique REQUEST Mid is not Unique in submitted XML
14
BulkSMS API Documentation
108 Mobile number SMS Mobile number If invalid mobile number specified
<Mobile Number > invalid 91-9322464675
invalid
113 Index <index Number> is not an integer MESSAGE Index Two is not an Index number of recipient is non numeric
integer
114 <Sender Id> sender id is invalid MESSAGE 12@3 sender id is If sender id Contains special character except Dot(.) and Alpha
invalid numeric greater than 11 char and Numeric > 16 digit
118 Long message feature not enabled MESSAGE If message text is greater than 160 characters and for
multi lingual more than 70
119 Multi lingual feature not enabled MESSAGE If message text contains other than English and client has been
not
enabled multi lingual feature
15
BulkSMS API Documentation
120 MESSAGE 9900000096 If mobile is greater or lesser than 12 digit number and
International SMS feature not enabled International feature has been not enabled
121 Account id <Account Id>invalid MESSAGE Account id India If Account id is non numeric
invalid
122 User name is empty. REQUEST If user does not supply in case user name required
123 Password is empty. REQUEST If user does not supply in case password required
16
BulkSMS API Documentation
17
BulkSMS API Documentation
136* The user NDNC REQUEST Message to user This happens when
status unknown 91990084xxxx the
rejected, since the NDNC status is not available for that particular user
user NDNC status
unknown. This is the
case when NDNC
registry does not
know the status of the
mobile number. This
happens when a
number is in the
market while NDNC
is not available of
its existence.
-1 Invalid Request Format REQUEST Feed id is empty , If record does not full fill required standard
Mobile number is
empty
*The error codes 131, 132, 136 occur only if the channel is set-up for NDNC validation.
Please find below few more error codes that can occur
137 There is an error in the account setting. Please contact your Account Manager
138 Error occurred while contacting payment portal ,Please try after some time or write us to [email protected]
139 Sorry Account not exist ,Please contact account manager or write us to [email protected]
18
BulkSMS API Documentation
143 Ambiguity,For Message type [%s] Can not have [%s] data
146 Message to user %s rejected,Since message can not be schedule after 30 days
147 User %s scheduled for NDNC hibernate has been expired -- Deprecated
150 Promotional Message to user %s rejected ,Since publish or schedule hour %s falls between TRAI Do not call
151 Request_id- %s,Txid- %s, Senderid- %s, Message to user- %s dropped due to insufficient balance
This API allows an enterprise to send a single message to one or more mobile numbers (Maximum of 50 Mobile
19
BulkSMS API Documentation
numbers) at one time. This is achieved by issuing a HTTP GET request to our server listening at
https://bulkpush.mytoday.com/BulkSms/SingleMsgApi with following GET parameters that must be URL
encoded.
Sample request :
https://test1bulksms.mytoday.com/BulkSms/SingleMsgApi?feedid=<account_id>&username=<username>&password=<password>&
To=<mobile>&Text=<message>&templateid=<templateid>&entityid=<entityid>&async=<1/0>&short=<1/0>
20
BulkSMS API Documentation
Host: test1bulksms.mytoday.com
Content-Type: application/x-www-form-urlencoded
feedid=<feedid>&username=<username>&password=<password>&To=<mobile/commaseparatedmobiles>&Text=<SMSText>&templa
teid=<templateid>&entityid=<entityid>&async=<1/0>
21
BulkSMS API Documentation
The API allows an enterprise to upload multiple messages at a time by creating a file containing mobile numbers and the
corresponding messages (either same message to everyone or different messages).
22
BulkSMS API Documentation
This API allows an enterprise to send multiple messages to users via XML. Same message can be specified for all users, or
different
messages could be specified to different users.
Different Sender ID can be specified for different messages – the Sender IDs need to be white-listed with Netcore prior to
use – else the
default Sender ID set for the enterprise account will be used to send messages to users.
23
BulkSMS API Documentation
UserRequest: The XML file containing the account and message details. The XML File must be submitted as The XML file
must be
URL- encoded and XML-encoded.
https://bulkpush.mytoday.com/BulkSms/SendSms
Stage :
https://test1bulksms.mytoday.com/BulkSms/SendSms
Sample XML
24
BulkSMS API Documentation
<ID>123</ID>
<ADDRESS FROM="Senderid" TO="mobile1" SEQ="1"/>
<ADDRESS FROM="Senderid" TO="mobile2" SEQ="2"/></SMS>
</MESSAGE>
Tab(\t) 	
Single Quote( ' ) '
Ampersand(&) &
You may use the same conversion if you choose to insert special characters in the tag parameter – but we don’t recommend it.
2.12.2 DTD for input XML
25
BulkSMS API Documentation
26
BulkSMS API Documentation
Message Type
0 – Plain Text SMS 1 – Flash SMS
TYPE And so on. Currently only plain text sms is supported No 0 0
.
MODE is the receiver subscribed to the account id or not. No 0 0
27
BulkSMS API Documentation
28
BulkSMS API Documentation
29
BulkSMS API Documentation
30
BulkSMS API Documentation
Specify the URL that needs to be sent out in the WAP Push
URL message using this No - http://mytoday.com
This tag contains the details of the person receiving the No values. All values are
SMS sms the attributes are explained below Yes None supplied in the attributes
FROM The sender of the message No Default sender registered with us MyToday
31
BulkSMS API Documentation
32
BulkSMS API Documentation
The XML API call returns an XML Response which acknowledges the
receipt of the request.
The format of the response is as follows - RESULT tag will always be present.
The tag REQUEST-ERROR will follow if it‘s a global error like invalid request.
Explanation of the different output XML Tags
Element Description
CODE Numeric value – when an error occurs – this contains the numeric code for the error
33
BulkSMS API Documentation
In case of successful handling this is the transaction ID as returned by our platform. The same can be
TID used to later fetch the delivery reports for the records processed.
BaseURL:
https://test1bulksms.mytoday.com/BulkSms/SendSms
Sample Format:
Sample request :
https://test1bulksms.mytoday.com/BulkSms/SendSms?UserRequest=%3C!DOCTYPE%20REQ%20SYSTEM%20%27https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fbulkpush.myt
oday.com%2F%2FBulkSms%2FBulkSmsV1.00.dtd%27%3E%3CREQ%3E%3CVER%3E1.0%3C%2FVER%3E%0A%3CUSER%3E%3CUSERNAME%3EUser%3C%2FUS
ERNAME%3E%3CPASSWORD%3Epassword%3C%2FPASSWORD%3E%3C%2FUSER%3E%3CACCOUNT%3E%3CID%3Efeedid%3C%2FID%3E%3CENTITYID%3EENTIT
YID%3C%2FENTITYID%3E%3C%2FACCOUNT%3E%3CMESSAGE%3E%3CTEMPLATEID%3ETEMPLATEID%3C%2FTEMPLATEID%3E%3CTEXT%3EMessage%3C%2FT
EXT%3E%3CTYPE%3E0%3C%2FTYPE%3E%3CMID%3E1%3C%2FMID%3E%3CSMS%20FROM%3D%27Senderid%27%20TO%3D%27Mobile%27%20INDEX%20%3D%2
71%27%3E%3C%2FSMS%3E%3C%2FMESSAGE%3E%3C%2FREQ%3E%0A
34
BulkSMS API Documentation
Output for the given above given sample of API call using GET method -
</MID>
</RESULT>
35
BulkSMS API Documentation
Json : The json parameter containing the account and message details.
Staging :
https://test1bulksms.mytoday.com/BulkSms/JsonSingleApi
Production :
https://bulkpush.mytoday.com/BulkSms/JsonSingleApi
Sample Payload
{"feedid":feedid,"username":Username,"password":"password","jobname":"Jobname/Messagetag","mobile":Mobile,"messages":"SM
S","templateid":"TemplateId","entityid":"EntityID"}
36
BulkSMS API Documentation
Staging :
https://test1bulksms.mytoday.com/BulkSms/JsonBulkApi
Production :
https://bulkpush.mytoday.com/BulkSms/JsonBulkApi
Sample Payload
{"feedid":"Feedid","username":"","password":"","jobname":"","entityid":"entityid",
"Data":[{"mobile":"Mobile1","messages":"message","senderid":"","msgId":"", "templateid":"templateid"},
{"mobile":"Mobile2","messages":"message","senderid":"","msgId":"", "templateid":"templateid"}]}
{
"req_id":"29749608793",
"status":"success",
"submittedAt":"2020-09-17 01:04:27"
}
37
BulkSMS API Documentation
38
BulkSMS API Documentation
This Response XML means that there was error in the formation of the complete
input XML.
<!DOCTYPE RESULT SYSTEM
'https://bulkpush.mytoday.com/BulkSms/BulkSmsRespV1.00.dtd'>
<RESULT>
39
BulkSMS API Documentation
<REQUEST-ERROR><ERROR>
<CODE>-1</CODE><DESC>Invalid record format</DESC></ERROR></REQUEST-ERROR> </RESULT>
Insufficient Credits
<!DOCTYPE RESULT SYSTEM
'https://bulkpush.mytoday.com/BulkSms/BulkSmsRespV1.00.dtd'>
<RESULT>
<REQUEST-ERROR>
<ERROR>
<CODE>104<CODE>
<DESC> Credit not sufficient </DESC>
</ERROR>
</REQUEST-ERROR>
</RESULT>
The error that is returned, if the XML format/ input format is incorrect
<!DOCTYPE RESULT SYSTEM
'https://bulkpush.mytoday.com/BulkSms/BulkSmsRespV1.00.dtd'>
<RESULT>
<REQUEST-ERROR>
<ERROR>
<CODE>101</CODE>
<DESC>XML MALFORMEDnull</DESC>
</ERROR>
</REQUEST-ERROR>
</RESULT>
40
BulkSMS API Documentation
In the following example, the text is intended to be sent to 3 recipients, out of which
2 recipients have invalid mobile numbers.
When this happens, the API will send out 1 message for which the
number has been specified correctly, and return an error for the
other 2 mobile numbers.
41
BulkSMS API Documentation
42
BulkSMS API Documentation
■ If not already installed, you might have to install the open SSL
extension to use HTTPS URLs. If you keep trusted certificates on your
computer, you can have Open-SSL verify the server's certificates. If
not, your conversation with the server will be confidential, but you won't
be able to definitively authenticate the server. It might be an impostor.
● Now Open-SSL can verify that you are actually talking to the web server
at bulkpush.mytoday.com and not an impostor.
43
BulkSMS API Documentation
Chapter 3
3.1 Methods to Fetch Delivery reports
3.1.1 Reports VIA Bizbond Panel:
You can download the delivery reports from BizBond Panel for the same you
need to login to http://biz.mytoday.com/web/ link, then click on Reports tab.
You will get to below page
44
BulkSMS API Documentation
45
BulkSMS API Documentation
http://stats.mytoday.com/dlr_api?feedid=12345&date=2009-12-05
When you call the API, the Delivery Report Request Transaction ID
will be returned. This will need to be used for further
requests to fetch the Delivery Report.
2. For consequent requests to fetch the Delivery Report, the API needs to
be invoked the DLR Request Transaction ID parameter (dtxnid=<DTXNID>):
http://stats.mytoday.com/dlr_api?feedid=12345&date=2009-12-05&dtxnid=6xyjiulsd24afsf
46
BulkSMS API Documentation
http://stats.mytoday.com/dlr_api?feedid=12345&date=2009-12- 05&dtxnid=6xyjiulsd24afsf&ack=1
47
BulkSMS API Documentation
you.
For better scaling and support, these are the few parameters:
integer (upto 64
mobile 919000000000 the mobile number tat message was sent to
bytes)
2009-02-20
delv_date datetime the date and time when message was delivered.
00:00:00
feedid integer (upto 64 534867 The feedid from which client sent the message
bytes)
48
BulkSMS API Documentation
49
BulkSMS API Documentation
○ The number might have been used for illegal activities in past
○ Nonpayment of bills
○ The number might belong to a V.V.VIP person of an organization
50
BulkSMS API Documentation
or
● Expired - These are the numbers to which the messages are not delivered
after multiple retires from the Operator end because of the remote operator
end issues.
● Force Expired - These are the numbers to which messages are dropped
due to rules in our system or due to invalid numbers in the uploaded base
or the client has requested to drop the messages.
51
BulkSMS API Documentation
dropped.
● Pending - These are the messages which are not sent out of our system.
52