Test Our APIs
Test Our APIs
2 Powered by
1. Introduction
This REST API document describes the API details and the fields to be sent on the API to:
You must Whitelist the IP addresses from which you will be sending these API requests, before sending any
requests.
Please use this document to test our APIs only, before integrating. Data will be wiped daily.
Invoke this API to get the access and refresh tokens. Access token is required to invoke any further API
requests. The request and response will be in JSON format.
The access token is valid for 24 hours from the time it is created. The user must get a new access token
every 24 hours.
The refresh token is valid for 30 days, post which you must invoke the below API again to get e new
refresh token.
URL: https://XX.XX.XX.XXX/api/token/
Method: POST
Parameters:
password string (20) Password generated on Telco portal for Enterprise API
Note: Access token must be passed in authorization header as the bearer token.
3 Powered by
Response:
Failed response:
4 Powered by
1.2 Refresh Token
Invoke this API request to get new access token for authorization. The request and response will be JSON
format.
Refresh token in the response from request (sec 1.1) must be passed as parameter to this API request. The
refresh token is valid for 30 days and need to get new token by using API method in section 1.1
URL: https://XX.XX.XX.XXX/api/token/refresh
Method: POST
Parameters:
Response:
The response will be in JSON format.
Success response:
{
“access”:”eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxN
TQ1ODg3OTk0LCJqdGkiOiIwYjVhMmQzMWYyYmM0NmE3YWI2MjZlZD
AzMTA4ZDFkNyIsInVpZCI6OTV9.joB_MjW1tCrFXGOJGROnIUE0-cBaC5U-
mYQ0B6qoqp8”
}
5 Powered by
2. Header Registration
Header is a unique combination of 3-6 characters representing the Brand Name of the message sender.
As per the TCCCPR regulation the sender ID/source address/A-Party address is termed as ‘Header’. You
can use this API to register a new Header for your Enterprise by using the below API. The Promotional
Headers must be numeric and the headers for all the Other types (Transactional, Service Implicit and
Service Explicit) must be Alphabet or Alphanumeric.
URL: https://XX.XX.XX.XXX/api/header
Parameters:
1. Promotional: These messages are related to marketing purposes and are intended for promoting a
product or a service. Promotional SMSs are sent to the Non DND numbers.
Headers for sending Promotional SMS must be of 6 numeric and based on the relevant business category.
(Refer Annexure 5.2)
6 Powered by
Examples: Promotional messages headers: 234567, 345678, 456789, 578901 and in API must use htype
as “P” and hctgy as 2 and header must be “234567”
2. Other: The Other category comprises of Transactional, Service Implicit (SI) and Service Explicit (SE).
2.1 Transactional: As per the latest TRAI Guidelines, only the OTP SMS sent by banks will come under
the category of Transactional SMS. Transactional SMS can be used only by banks for sending One
Time Password (OTP) to its clients. All banks including National / Scheduled / Government / Private
and MNC Banks can send OTP to their clients from the Transactional route.
Note: Banks can use Transactional route for sending OTP only. Headers for Transactional details,
amount debited, credited, account status and all other bank messages must not be registered as
Transactional.
2.2 Service Implicit: Informative messages other than Banks OTP come under this category. Important
notifications such as purchase updates, order alerts, payment status, reminders, booking
confirmations, OTP SMS from other sites and other crucial updates must be registered as Service
Implicit.
2.3 Service Explicit: Sending offer/marketing SMS to your registered users will come under this category.
These SMS can only be sent to the registered customers after receiving their consent.
Headers Registration guidelines for sending Transactional, Service Implicit and Service Explicit messages
For Non-Government Entities: For Alphabetic/Alphanumeric headers, length should always be between
3-6 (Min:3 Max:6).
ii. For Alphabet/Alphanumeric header length should always be in between 3-6 (Min:3 Max:6).
7 Powered by
Response:
The response will be in JSON format and it contains status, message and hid (max length 19). The status
200 indicates the header request is accepted by DLT API platform and returns19-digit unique reference
hid (Header ID).
Success response:
{
"status": 200,
“hid”: "1156789012345678234",
"msg": "Header request submitted successfully”
}
Failure response:
Any status other than 200 indicates a failure response.
8 Powered by
3. Content Template Registration
As per the new TCCCPR 2018 regulation, it is mandatory for an Entity to register their SMS content as a
Content Template on DLT platform. Content templates can be used to send messages to the subscribers
only after approval. You can use variables in the content template for Dynamic data, to use a variable,
use {#var#} in the content template.
The below API request to register a Content Template for an Enterprise. The request and response will
be in JSON format and method will be ‘POST’.
URL: https://XX.XX.XX.XXX/api/content_template
Parameters:
Parameter Type Mandatory/ Optional Description
Your Entity ID which is assigned after
Eid String (20) Mandatory
registering on the portal.
Type of Template - P/T/SI/SE
"P" - Promotional
“T” - Transactional
Ttype String (2) Mandatory
“SI” - Service Implicit
“SE” - Service Explicit
Example: ”P”
Category ID.
Ctgy Integer Mandatory
Refer Annexure 5.2
Headers array (Max 5 are allowed per
request)
Hdrs Array Mandatory Header Names (Numeric for Promotional and
Alphabets/Alphanumerics for all the Other
Types)
Message Type,
Optional values allowed:
msgtype Integer
(Default:1) 1-Text
2-Regional
Active consent Template ID
Cstid String (20) Optional (Must pass only if Template Type is “P” or
“SE”)
Active Brand Name, that has been registered
bname String (50) Optional
on the Platform.
Template Name and Only ascii characters are
tname String (50) Mandatory
allowed.
Template Message
Tmsg String (10000) Mandatory
Refer Rule v
9 Powered by
Rules:
Response:
The response will be in JSON format and it contains status, message and ctid(max length 19). The status
200 indicates the Content Template request is accepted by DLT API platform and returns19-digit unique
reference ctid (Content Template ID).
Success response:
{
"status": 200,
“ctid”: "1145678901234567823",
"msg": "Template request submitted successfully”
}
10 Powered by
Failure response:
Any status other than 200 indicates a failure response.
11 Powered by
4. Consent Template Registration
A consent template is a Template that will be stored on the DLT post approval. This Consent Template
contains the Name of the Consent Template, Brand name and the Scope of Consent. The Enterprise
name, Brand name and Scope of Consent will be shared with the subscriber as a part of the Consent
Acquisition Message. Based on the Scope of Consent, the subscriber will decide whether to give consent
or not. Principal Entity must register its Consent Templates and get authorization from a subscriber o be
able to send Promotional and Service-Explicit messages.
URL: https://XX.XX.XX.XXX/api/consent_template
Parameters:
Mandatory/
Parameter Type Description
Optional
Your Entity ID which is assigned after
eid String (20) Mandatory
registering on the portal.
Consent Template Name - Only
Mandatory
tname String (50) alphanumeric and these (.#,-_) special
Min: 2 Max: 50
characters.
Brand Name and
Mandatory
bname String (50) Only alphanumeric and these (.#,-_) special
Min: 2 Max: 50
characters.
Scope of Consent Template
Mandatory
scope String (200) Only alphanumeric and these characters
Min: 2 Max: 50
()/:.;!,&#$%^*\[]{}-@_are allowed
Callback URL on which you will notified
cburl String (100) Optional
about the status of the Consent Template.
Request:
{
"eid ": “1123456789012345678”,
"tname ": “test”,
"bname": “testbrand”,
"scope ": “test scope of consent”
}
12 Powered by
Response:
The response will be in JSON format and it contains status, message and cstid (max length 19). The status
200 indicates the Consent Template request is accepted by DLT API platform and returns19-digit unique
reference cstid (Consent Template ID).
Success response:
{
"status": 200,
“ctid”: "1145678901234567823",
"msg": "Consent Template request submitted successfully”
}
Failure response:
Any status other than 200 indicates a failure response.
13 Powered by
5. Annexure
5.1 Status Codes
Code Description
200 Success
411 PE ID mismatch
14 Powered by
5.2 Categories
ID Description
0 Other
2 Real Estate
3 Education
4 Health
6 Communication/Broadcasting/Entertainment/IT
15 Powered by