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

Parameter

Value

Description

userid

The number must be in pure numeric format with no special characters.

The account number provided by the Enterprise SMS GupShup.

password

UrlEncoded 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_to

Phone no. of the receiver

The number must be in numbers of a pure numeric format with no special characters.

msg

UrlEncoded string of UTF-8
characters

The message that needs to be sent. It can contain alphanumeric & special characters.

auth_scheme

Plain

Only plain authentication is supported.

method

sendMessage

Method for performing a specific action.

v

1.1

The default version is 1.1, unless otherwise specified.

format

TEXT, XML, JSON

Specific format for response message.

msg_type

Text, Unicode_text, or flash,
VCARD, binary

Indicates the type of the message to be sent.

Optional parameters

Parameter

Value

Description

port

Port Number

It is a pure number and needs to be specified if the message is being sent to a port.

timestamp

URL encoded timestamp in the given format

A 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)

mask

Alphabetical characters

Sender 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_id

Numeric/Alphanumeric value

Custom 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.

extra

Alphanumeric characters

You 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.

principalEntityId

Numeric 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.

dltTemplateId

Numeric 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)


Did this page help you?