The SMS API supports the following:
POST
- When you send a POST request with file containing mobile numbers of customers, We send SMS message you specify to all the numbers exist in file.
Types of services and their values are listed below:
Country code is mandatory to be included in the to
paramenter for global messaging and optional for indian numbers. If country code not found, default 91
will get appended to mobile number.
Before you start sending transactional SMS through this API, please test whether your content is matching a template which has been pre approved. Otherwise, the SMS will end up being rejected.
{endpoint}sms/bulk?access_token=werfxxxxxxxxxmessage=Welcome&sender=TXTSMS&to=91901xxxxxx&service=T
You can send sms using POST
method only as uploading file will supporting in
POST
.
Name | Descriptions |
---|---|
to | Phone number to send with country prefix. (multiple numbers can be separated by comma.) |
message | The content of the SMS |
sender | The registered and approved Sender-id |
service | Determines whether the SMS to be sent is Transactional, Promotional or other. |
file | Request body form-data you need to select file parameter and need to upload file containing mobile numbers. |
Name | Descriptions |
---|---|
dlr_url | The Url for which the SMS response to be sent after sending the SMS can be specified using this parameter. |
time | Schedule time (in format i.e,yyyy-mm-dd hh:mm:ss) at which the SMS has to be sent. |
type | The SMS to be sent is Unicode, Normal or Auto detect. (value “U”, “N” or “A”) |
flash | This parameter can be used to send flash sms via API ( Values 1 or 0.) |
custom | Any customised parameters can be passed using this parameter |
custom1 | Any customised parameter |
port | Port number to which SMS has to be sent |
column | Mobile number column name same as in customize sms |
curl -X POST \
'http://portal.mobtexting.co/api/v2/sms/bulk?access_token=d9e1cacxxxxxxxxxxxxxx&sender=TXTSMS&message=Your message content&service=T' \
-H 'cache-control: no-cache' \
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
-H 'postman-token: c9cccb6e-5b41-9b2c-e4d8-42935ca511ac' \
-F file=@filename.txt
{
"status": 200,
"message": "XXX numbers accepted for delivery.",
"data": []
}