Send Messages to Single Number

You can send specific message to any number mobile through SMS channel by using Gupshup Enterprise SMS API.

Prerequisites

To send message to any mobile number by using 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.

Send API request

Once you collect the required prerequisites to send SMS, send the API request in the following format:

[https://enterprise.smsgupshup.com/GatewayAPI/rest?userid=XXXXXX&password=pass
word&send_to=9199xxxxxxxx&method=SendMessage&msg=
Welcome%20to%20SMS%20GupShup%20API&msg_type=
TEXT&&auth_scheme=plain&v=1.1&format=text]]

Required parameters

ParameterValueDescription
useridThe number must be in pure numeric format with no special characters.The account number provided by the Enterprise SMS GupShup.
passwordUrlEncoded string of UTF-8
characters
Password is provided by Gupshup for authentication of user id. The password must be the same as used to log on to the Enterprise SMS GupShup website.
send_toPhone no. of the receiverThe number must be in numbers of a pure numeric format with no special characters.
msgUrlEncoded string of UTF-8
characters
The message that needs to be sent. It can contain alphanumeric & special characters.
auth_schemePlainOnly plain authentication is supported.
methodsendMessageMethod for performing a specific action.
v1.1The default version is 1.1, unless otherwise specified.
formatTEXT, XML, JSONSpecific format for response message.
msg_typeText, Unicode_text, or flash,
VCARD, binary
Indicates the type of the message to be sent.

Optional parameters

ParameterValueDescription
portPort NumberIt is a pure number and needs to be specified if the message is being sent to a port.
timestampURL encoded timestamp in the given formatA sender can specify a particular time for sending the message. Accepted timestamp formats are:
1. yyyy-MM-dd HH:mm:ss
(2008-11-21 23:12:32 or 2008-3-4 2:44:23)
2. MM/dd/yy HH:mm:ss
(11/21/08 23:12:32 or 3/4/08 2:44:33)
3. MM/dd/yy hh:mm:ss
(11/21/08 12:09:08)
maskAlphabetical charactersSender id is to be sent with the SMS. It has to be preconfigured with a 6 character alphabetical sender id for the enterprise account.
msg_idNumeric/Alphanumeric valueCustom message ID. This will be attached to the callback URL. You can use your internal IDs to identify the DLRs more easily. 500 characters numeric/alphanumeric value is allowed for message id.
extraAlphanumeric charactersYou can input any text into this parameter and the same value will be forwarded to a callback URL. 50 alphanumeric characters are allowed
for this parameter.
principalEntityIdNumeric characters provided by
operators DLT Portal
The Entity ID is registered with the DLT platform. Every entity has to register themselves on the operator's DLT portal to send messages.
dltTemplateIdNumeric characters provided by
operators DLT Portal
The Template ID is registered with the DLT platform for the Entity ID. Each entity has to register templates to send messages to their registered customers.

Examples

Here are examples of the 2 types of message types. You can replace the highlighted text with your credentials and send the messages.

Text

https://enterprise.smsgupshup.com/GatewayAPI/rest?msg= Hi%20Test%20Message
&v=1.1&userid=XXXXXXXXX&password=XXXXX&send_to=9XXXXXXXXX&msg_type=text&method=sendMessage

Response: success|919899999999|660362025761505631-520576818555598760
Message on mobile: Hi Test Message

Unicode

https://enterprise.smsgupshup.com/GatewayAPI/rest?msg=%E0%A4%8F%E0%A4%B8%20%E0%A4%8F%E0%A
4%AE%20%E0%A4%8F%E0%A4%B8%20%E0%A4%97%E0%A4%AA%E0%A4%B6%E0%A4%AA&v=1.1&useri
d=XXXXXXXXX&password=XXXXX&send_to=9XXXXXXXXX&msg_type=Unicode_Text&method=sendMessage

Response: success | 919899999999 | 660362044229091694-472194266127262392
Received on phone: (copy paste into your browser if you can’t see this)