BulkSMS - API - Documentation - With TLV - Parameters
BulkSMS - API - Documentation - With TLV - Parameters
API
Documentation
CONTENTS
Introduction 4
1.1 Purpose 4
1.2 Audience 4
1.3 Acronyms and Abbreviations 4
1.4 Contact Details 4
Chapter 2 5
2.1 Chapter Overview 5
2.2 Mobile number guidelines in API usage 5
2.3 Choice between IP address & mobile number authentication 5
2.3.1 White listing client public IP addresses – 5
2.3.2 Mobile number & password authentication. 5
2.4 SMS Header and Footer 6
2.5 API in Asynchronous mode 6
2.6 Message Types 7
2.7 How to send UDH (port based) Message 8
2.7.1 UDH Octet parameter details 9
2.7.2 Send Message to a port number with more than 140 bytes, 10
2.7.3 How to encode Binary message 11
2.8 API Parameters 11
2.9 API Responses 13
2.10 Single Message API 18
2.10.1 Using GET method 18
2.10.2 Using POST method 19
2
BulkSMS API Documentation
Chapter 3 42
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
IP Internet Protocol
4
BulkSMS API Documentation
Chapter 2
2.1 Chapter Overview
This chapter contains an overview of nectore’s BulkSMS API.
5
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
6
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 )
7
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
8
BulkSMS API Documentation
%06%05%04%13%88%00%00
%2506%2505%2504%2513%2588%2500%2500
Octet Number
Value Description
9
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)
10
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.
11
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)
12
BulkSMS API Documentation
102 Client < Account ID> is not registered REQUEST Client 18888 is not If the Account id
registered for the Client is not registered with MyToday
103 Login failed REQUEST Invalid login information entered
104 Credit is insufficient Credit is insufficient If the credit for Account expired
REQUEST
105 <IP address> is not white listed REQUEST 127.40.0.12 IP is not If the IP of calling client is not registered for Account
white-listed
107 Message Id not unique REQUEST Mid is not Unique in submitted XML
108 Mobile number SMS Mobile number 91- If invalid mobile number specified
<Mobile Number > invalid 9322464675 invalid
109 Sender id <sender id> not registered SMS Sender ID needs to be registered
for account <Account
13
BulkSMS API Documentation
id>
112 Message id <id Number > is not an Integer MESSAGE Message id Hello is not an
Integer
113 Index <index Number> is not an integer MESSAGE Index Two is not an integer Index number of recipient is non numeric
114 <Sender Id> sender id is invalid MESSAGE 12@3 sender id is invalid If sender id Contains special character except Dot(.) and Alpha
numeric greater than 11 char and Numeric > 16 digit
115 Please check that the tag is not greater than 25 MESSAGE
characters or contains special characters
116 Incorrect Version number MESSAGE Incorrect Version number Other than 1.0
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
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 invalid If Account id is non numeric
14
BulkSMS API Documentation
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
15
BulkSMS API Documentation
130 Invalid Expiry Time REQUEST If expiry time is not numeric in Expiry time configuration incorrect. . If you get this Error - Contact
database your Account Manager.
Example: a124
131* NDNC Status is currently unavailable REQUEST Message to user This happens when the system is unable to get the NDNC status for a
91990084xxxx rejected, since particular mobile number.
the NDNC Status is currently
unavailable. This means that
MyToday has not yet checked
with the
NDNC registry about the
status.
132* The user is registered for NDNC REQUEST Message to user This happens when the user is registered with NDNC & doesn't wish to
91990084xxxx rejected, since receive sms.
the user is registered for
NDNC and it means that user
does not want to receive any
unsolicited
messages
136* The user NDNC REQUEST Message to user This happens when
status unknown 91990084xxxx rejected, since the
the user NDNC status NDNC status is not available for that particular user
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.
16
BulkSMS API Documentation
-1 Invalid Request Format REQUEST Feed id is empty , Mobile If record does not full fill required standard
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]
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
17
BulkSMS API Documentation
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
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>
18
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>
19
BulkSMS API Documentation
20
BulkSMS API Documentation
--data-urlencode 'short=<0/1>'
21
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.
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
22
BulkSMS API Documentation
Sample XML
23
BulkSMS API Documentation
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.
24
BulkSMS API Documentation
<!ELEMENT ID (#PCDATA)>
<!ELEMENT MESSAGE (TAG?,TEXT?,DLR?,TYPE?,MID,VALIDITY?,HIBERNATE?,URL?,UDH?,SMS+)>
<!ELEMENT TEXT ANY>
<!ELEMENT TAG ANY>
<!ELEMENT MID (#PCDATA)>
<!ELEMENT DLR (#PCDATA)>
<!ELEMENT TYPE (#PCDATA)>
<!ELEMENT VALIDITY (#PCDATA)>
<!ELEMENT HIBERNATE (#PCDATA)>
<!ELEMENT URL (#PCDATA)>
<!ELEMENT UDH (#PCDATA)>
<!ELEMENT SMS EMPTY> <!ATTLIST SMS FROM CDATA #IMPLIED
TIME CDATA #IMPLIED TO CDATA #REQUIRED INDEX
CDATA #REQUIRED TAG CDATA #IMPLIED>
Elem
ent Description Mandatory Default value Examples
25
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
The account id. It is against this id that we validate the Sender ids,
credits and other attributes. Ids
ACCID should be valid integers Yes None 1410
26
BulkSMS API Documentation
A text that identifies the message. This text is supplied by the client.
The response will contain this tag along with the message id.
Minimum 7 chars and max 25 chars if present. Allowed chars [A-
TAG Z a,z 0-9, _, <space>] No None Winner message
27
BulkSMS API Documentation
This flag is used to indicate the Message type that needs to be sent:
(1 – text; 5 – WAP; 7 – Mono ringtone; 10 – Non-Nokia mono
ringtone; 8 – Picture message; 13 – UDH). For details, refer to 5
TYPE Section 2.8 No 1 (to send WAP messages)
28
BulkSMS API Documentation
Specify the URL that needs to be sent out in the WAP Push
URL message using this No - http://mytoday.com
Use this parameter to specify the user-defined header while sending %2506%2505%25
message to an application 04%2515%2582%
UDH port number No - 2500%2500
This tag contains the details of the person receiving the sms the No values. All values are
SMS attributes are explained below Yes None supplied in the attributes
FROM The sender of the message No Default sender registered with us MyToday
29
BulkSMS API Documentation
Person receiving the SMS. See section 2.2 to know more about
TO Mobile number guidelines Yes None 919967025255
A text that identifies the recepient. This text is supplied by the client.
Minimum 7 chars and max 25 chars if present. Allowed chars [A- Z
TAG a,z 0-9, _, <space>] No None Winner message
30
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
31
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
32
BulkSMS API Documentation
Output for the given above given sample of API call using GET method -
</MID>
</RESULT>
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.
Json : The json parameter containing the account and message details.
33
BulkSMS API Documentation
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"}
34
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"
}
35
BulkSMS API Documentation
In case the credits have expired/ are insufficient in the Enterprise Account:
36
BulkSMS API Documentation
International not enabled on feed but mobile number mentioned in request is international
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>
<REQUEST-ERROR><ERROR>
<CODE>-1</CODE><DESC>Invalid record format</DESC></ERROR></REQUEST-ERROR> </RESULT>
37
BulkSMS API Documentation
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>
38
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.
39
BulkSMS API Documentation
■ When a user connects to a website via HTTPS, the website encrypts the session with a digital certificate.
■ You can send secured requests to the bulkpush.mytoday.com using HTTPS Connection.
■ The bulkpush.mytoday.com server listens on port 443 and expects an encrypted request. To make secured HTTPS requests to
the bulk-push API, instantiate an open SSL enabled net http client.
■ 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.
40
BulkSMS API Documentation
● On Debian/Linux the CA-Certificates package installs a set of trusted server certificates in the directory /etc/ssl/certs. You can
set the object's certificates- authority path to that directory and set the verify mode to verify-peer.
● Now Open-SSL can verify that you are actually talking to the web server at bulkpush.mytoday.com and not an impostor.
● The SSL certificate for mytoday.com is signed by Digicert.If you already have Digicert certificate installed on your computer, you can
verify bulkpush.mytoday.com's signature. That is "If I trust Digicert, I can trust mytoday.com".
41
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
To download details reports use first option “Download Detailed Reports for “ , use select and click on download. Second option
”Search From” can be used for searching delivery status of one mobile number for single day from single channel.
42
BulkSMS API Documentation
http://stats.mytoday.com/dlr_api?feedid=12345&date=2009-12-05
Feedid is a mandatory parameter for which you must specify a value. Date is one of the optional parameters. If do not specify a
date, by default, the delivery report for today’s date will be shown. Refer to API Parameters for API Parameters.
If there is any error while specifying the API parameters, error message will be displayed corresponding to the type of error.
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
43
BulkSMS API Documentation
FETCHING implies that the Delivery Report retrieval is in progress. The API needs to be invoked in a loop till status is returned as
DONE. DONE status indicates that the delivery report can be retrieved in the next API call.
http://stats.mytoday.com/dlr_api?feedid=12345&date=2009-12- 05&dtxnid=6xyjiulsd24afsf&ack=1
44
BulkSMS API Documentation
Below is the example of delivery reports Ping Back: This will be a http GET call to the URL provided by 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)
45
BulkSMS API Documentation
■ These are the users for whom we received a response that this is an Invalid user from the operator when we
tried sending the message to them. If required we can give you the confirmed invalid numbers.
■ There can also be a case when you push the message to 10 digit mobile number, but that number is not Active
use. It may also be a case, that the number is with the SIM card seller and it has not been purchased so far.
■ You have sent a message to a number which is not a valid 10 digit or 12 digit (with '91' as prefix) mobile
number.
● SMS/Message Inbox full - As the name suggests these are the users whose handset inbox was full when the message was
tried to be delivered to them.
46
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
○ Government of India has asked all operators to not send sms to that number.
○ User might have done many complaints to operator/TRAI regarding unsolicited sms being received by him.
● Undelivered - These are the users for whom message got failed after multiple retries due to various reasons like operator
end/user end issues.
● Submitted to Network - These are the messages for which we haven't received the delivery reports from the Operator. But, it
doesn't mean that the message were not Delivered to the end user. As per our observation, 85 to 90% of messages are
delivered to the end user, but we haven't received delivery acknowledgement/reports from the Operator. In such scenario, we
wait for approximately 24 to 48 hours for the reports to arrive from the Operator end. If the reports are received, those are
updated in the Online panel instantly. In case, if the reports are not received, the delivery status will remain as 'Submitted to
n/w'
● Dropped -
a. These are the numbers belonging to J&K (Jammu and Kashmir) series. There is ban from Govt of India since past few
years, because of which sms cannot be delivered on these numbers.
or
b. Dropped by the operator from their end. Services to the SIM card (mobile number) will be discontinued from the
Operator, if there is no usage i.e no voice calls (incoming & outgoing) , SMS and data for any continuous period of
60 days from the date of first call.
47
BulkSMS API Documentation
● 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.
● International Roaming: These are the users who are in International roaming with Indian numbers at the time when the
message was pushed to them.
● 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.
● Duplicate Message Drop : If the same message content is sent on the same mobile number within 30 min, the duplicate messages
will be dropped.
● Pending - These are the messages which are not sent out of our system.
48