Getting Started

Prerequisites to connect to API

To start using the Gupshup Enterprise SMS API, you should have:

  • User ID & password. If you don’t have an account, you can create one at Gupshup Enterprise SMS.
  • DLT template with messages for customers.

Authentication

Gupshup Enterprise SMS API supports only a Plain Authentication Scheme for users. This authentication scheme requires only the user ID and password. The connection security is provided through HTTPS protocol.

In addition to SSL, the API is designed to allow you to securely send sensitive data to the Gupshup platform by encrypting the data using Advanced Encryption Standard i.e. AES 256-bit encryption. At​ your request (please reach out to us at 022 42006799 or email us, a 256-bit symmetric key is generated by Gupshup and set up for your account.

You must use this key to encrypt API parameter values when sending the API request. Once the request is received by Gupshup, the payload is decrypted by Gupshup and sent ahead to the operator.

Managing DLT templates

Distributed ledger technology or DLT is a digital structure for retaining and handling the records of sender identities and templates. Every SMS text and your ID has to be submitted on the DLT SMS platform before sending Bulk SMS to your customers. After you have completed registration with any of the DLT operator platform (Jio, Vodafone, Airtel, Videocon, MTNL, BSNL), you need to send us the principalEntityId, Sender Header, dltTemplateId, template type, and SMS content.

Encoding message

Gupshup recommends you to encode your text message. Only the English language SMS can be sent without encoding the message. If you need to send SMS in different languages, then it's mandatory to encode your message.

📘

Currently Gupshup supports SMS in Hindi language only.

The message should be UrlEncoded (also known as percent encoding) string of UTF-8 characters.

For more information on URL encoding, please see this.

Example:
Original text
Hi Amar!
Happy Diwali to you
Regards,
[email protected]

Encoded text
Hi%20Amar%21%0AHappy%20Diwali%20to%20you%0ARegards%2C%0Ank%40w.com

Get your first call

Prerequisites

  1. Gupshup Enterprise SMS User ID and password
  2. DLT template information

Test your connection

  1. Login to Gupshup Enterprise SMS with above credentials.

  2. Send API request through web browser in the following format:

https://enterprise.smsgupshup.com/GatewayAPI/rest?userid=USER ID RECEIVED FROM GUPSHUP&password=PASSWORD RECEIVED FROM GUPSHUP&send_to=RECEIVER MOBIL NUMBER&msg=your text message&method=SendMessage&msg_type=text&format=text&auth_scheme=plain&v=1.1

Success Response

Successful execution of the request will generate an HTTP 200 response. The response to any request is a string
of tokens separated by pipe symbol (|).

A typical success response is:

success | 919XXXXXXXXX| 728014710863298817-1234567890

This indicates that the message request has been successfully accepted for mobile number 91XXXXXXXXXX under the Unique Identifier ‘728014710863298817-1234567890’. The identifier string is unique for each recipient number and is auto-generated at the time of message submission. The first number is the transaction ID and the second one is the message ID.

Failure Response

An error response is generated when any of the required parameters is not specified correctly. The error response
will indicate an error code along with the actual error message.

A typical error response is:

error | 102 | Authentication failed due to invalid userId or password.

Messages and text characters ratio

Refer to this table to know your customer will receive how many messages when you send any particular message. The calculation of the number messages is based on the number of characters in a text message.

No of MessagesText CharactersUnicode Characters
1 SMS
2 SMS
3 SMS
160-characters
306-characters
459-characters
70-characters
134-characters
201-characters
4 SMS
5 SMS
6 SMS
612-characters
765-characters
918-characters
268-characters
335-characters
402-characters
7 SMS
8 SMS
9 SMS
1071-characters
1224-characters
1377-characters
469-characters
536-characters
603-characters
10 SMS
11 SMS
12 SMS
13 SMS
14 SMS
15 SMS
16 SMS
17 SMS
18 SMS
19 SMS
20 SMS
21 SMS
22 SMS
23 SMS
24 SMS
25 SMS
26 SMS
27 SMS
28 SMS
29 SMS
30 SMS
1530-characters
1683-characters
1836-characters
1989-characters
2142-characters
2295-characters
2448-characters
2601-characters
2754-characters
2907-characters
3060-characters
3213-characters
3366-characters
3519-characters
3672-characters
3825-characters
3978-characters
4131-characters
4284-characters
4437-characters
4590-characters
670-characters
737-characters
804-characters
871-characters
938-characters
1005-characters
1072-characters
1139-characters
1206-characters
1273-characters
1340-characters
1407-characters
1474-characters
1541-characters
1608-characters
1675-characters
1742-characters
1809-characters
1876-characters
1943-characters
2000-characters
31 SMS4743-characters
32 SMS
33 SMS
34 SMS
4896-characters
5049-characters
5202-characters
35 SMS
36 SMS
37 SMS
5355-characters
5508-characters
5661-characters
38 SMS
39 SMS
40 SMS
5814-characters
5967-characters
6120-characters
41 SMS
42 SMS
43 SMS
6273-characters
6426-characters
6579-characters
44 SMS6732-characters
45 SMS
46 SMS
6885-characters
7038-characters
47 SMS7191-characters
48 SMS
49 SMS
50 SMS
7344-characters
7497-characters
7650-characters
51 SMS7803-characters
52 SMS7956-characters
53 SMS8000-characters