Send Multiple Messages to Multiple Numbers

The file upload API is designed to enable a user to upload a file through which the user can send different
messages to a large set of numbers in single authentication. The API supports uploading files of the following
formats:

  1. XLS file
  2. CSV file
  3. ZIP file containing either an XLS or a CSV file

The first row in each file contains the headers for which the values are provided in the following rows. All the
headers are case sensitive in both .csv and .xls files.

Checks while using a CSV File

Ensure the following guidelines are followed when using a CSV file. To find out more about CSV files, please see this:

  1. The CSV files should be UTF-8 encoded.
  2. Enclose the headers with quotation marks.
  3. Delimit the fields with a comma.
  4. Enclose the entries in the MESSAGE field with quotation marks.
  5. Do not use a space between the comma and the starting or ending quotes enclosing the field.
  6. Ensure that you do not leave a stray quotation mark in the message, otherwise an error occurs in
    processing the message and all the further entries of the file. A stray quotation mark should be nullified by
    another quotation mark. Messages like You”ll be late should be written as “You””ll be late”. Excel exports
    file to CSV format in the same format.
  7. Ensure that there are commas in the right place. Do not add any extra commas or do not skip commas in
    the entry, else the file will not be processed after the erroneous entry.

Uploading a file with HTTPS request

You can upload a file with the HTTPS request as a part of multi-part form data. The following parameters
need to be sent as a part of the request. Please refer to sample file upload codes.

Parameter

Value

Description

Method (required)

xlsUpload

It specifies the way the uploading should take place.

filetype (required)

xls, .csv or zip

It specifies the format of the file being uploaded.

msg_type (required)

Text, Unicode_text, or
flash, binary

Indicates the type of the message to be sent. The message can be either text, Unicode_Text (non-English) or flash. Currently, a Flash message can be sent only on GSM phones and the maximum length of a flash message is 160 characters.

port (optional)

Port Number

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

timestamp (optional)

URL encoded
timestamp in the given
format

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 a (11/21/08 11:12:32 PM or 3/4/08 2:44:33 AM)
  2. MM/dd/yy hh:mm a (11/21/08 11:12 PM or 3/4/08 2:44 AM).

Success Response

When the file upload is successful, the following message is displayed.

Your file is being processed. Transaction id 3374138381907707211. Please refer upload history below for final
status.

Final status can be checked on the Enterprise panel (enterprise.smsgupshup.com) under SMS > Bulk > Upload
History.

For the transaction id : 3374138381907707211, 10 entries were successfully uploaded and 0 entries failed.
Duplicate entries found were: 0

Error Response

Sample error that can occur on an HTTPS request:

When a request is formed properly and if all the entries from the input file fail, then the following response is
generated. This status can be checked in the enterprise panel (enterprise.smsgupshup.com) under SMS > Bulk >
Upload History.
For the transaction id : , all the entries failed.

For the transaction id : "3161044544991409483", all the "2" entries failed

Customized File Upload

To send customized messages to a list of numbers.
a) Excel sheet format
Stated below is a list of the headers to be used to send customized messages.
i) PHONE – list of phone numbers to which messages need to be sent.
ii) MESSAGE – Message which needs to be sent out to the customer. This message should clearly
indicate the variable fields which are denoted by “%VAR”. The first variable in the text will be stated as
%VAR1 . The next variable is stated as %VAR2 and so forth.
iii) %VAR – This field indicates the variable which needs to be sent to the customer.
As indicated in point 2, for each variable in the text a relevant %VAR header needs to be stated.

591591

📘

If the message text is the same for all customers, then the message header can be ignored in the sample below .​excel file. However, the message along with the variable fields needs to be clearly indicated in the API parameters.

446446

Scheduling Feature in file upload

The sender can specify a particular time for sending the message. The Timestamps column can be added to the file. The formats are as follows:

  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 a (11/21/08 11:12:32 PM or 3/4/08 2:44:33 AM)
    4.MM/dd/yy hh:mm a (11/21/08 11:12 PM or 3/4/08 2:44 AM)
680680

Did this page help you?