SMSala API V 3.0

Documentation


  • Created: 10 December, 2021
  • Update: 10 December, 2021

If you have any questions that are beyond the scope of this help file, Please feel free to email via Support Team.


Installation

Follow the steps below to setup your site API:

  1. Whereever YOUR_API_URL is written in this documentation please do not forget to change that with your website url, regardless of this whether you are using https:// or http:// use the same as per your domain url.
  2. In addition to this if you are using ASP.NET/ C# please use http web request / web client
  3. If you are using PHP, then ensure that curl is enabled on your hosting server.
  4. Then after succesful registration you will receive credentials [ app_id and app_password]in your registered email inbox, without these app_id and app_password credentials you will not be allowed to make any requests.
  5. You can use both GET and POST type of requests but we recommend you to make use of POST requests for security reasons.
  6. You are good to go for integrating our APIs with your project.

Sending SMS Through Web API

Send Single SMS to URL: https://api.smsala.com/api/SendSMS

To send single text to multiple numbers using a single submission use below link https://api.smsala.com/api/SendSMSMulti


Sending SMS through Web API [Parameters]

Parameter Name Required Description Example
api_id Yes Your API ID Sent in Email API43404236
api_password Yes Your API Password Sent in Email [email protected]
sms_type Yes Message Type Promotional SMS / Transactional SMS P for Promotional
T for Transactional
encoding Yes SMS Encoding Text, Unicode etc. T for Text
U for Unicode
FS for Flash Message
UFS for Unicode Flash Message
sender_id Yes Your Sender ID Your Registered Sender ID
phonenumber Yes Recipient Phone Number Phone Number Should No Contain + Sign
Phone Number Format is Country Code + Phone Number
Example: 919622333345
In case of bulk submit , separate each number with a comma like 911234567890,63344455678,971543213066
templateid Optional Required If You Want to Send Existing Template. Check Template ID in Customer Panel Template ID from Customer Panel Example: 10
textmessage Conditional If Template ID is provided text message is not required Text of SMS Message to Send
V1 Optional Variable 1 To Replace in Template Any Data for Variable 1 You Want to Replace
V2 Optional Variable 2 To Replace in Template Any Data for Variable 2 You Want to Replace
V3 Optional Variable 3 To Replace in Template Any Data for Variable 3 You Want to Replace
V4 Optional Variable 4 To Replace in Template Any Data for Variable 4 You Want to Replace
V5 Optional Variable 5 To Replace in Template Any Data for Variable 5 You Want to Replace
ValidityPeriodInSeconds Optional Message validity period (Expiry time) Default is 2 days, you can set it manually int value as second like 60 for 1 min.
Uid Optional Message reference variable, this value will return as it is in quick response and delivery xyz
callback_url Optional The CallBack-URL where you wanna delivery report. We will post the json data of delivery. https://xyz.com/
pe_id Optional DLT parameter xyz
template_id Conditional DLT parameter (if given pe_id then this field is required ) xyz

Note: uid and callback_url parameters is not supported with SendSMSMulti API. Only for SendSMS API.


Calling The API


Method-1: Using GET Request

https://api.smsala.com/api/[email protected]&sms_type=P&encoding=T&sender_id=SMSALA&phonenumber=91999020323&textmessage=test&uid=xyz&callback_url=https://xyz.com/


Method-2: Using POST Request

Post Request JSON Format
{
"api_id": yourapiid,
"api_password": yourapipassword,
"sms_type": T,
"encoding": T,
"sender_id": SMSALA,
"phonenumber": 919990123312,
"templateid": null,
"textmessage":test message,
"V1": null,
"V2": null,
"V3": null,
"V4": null,
"V5": null,
"ValidityPeriodInSeconds": 60,
"uid":"xyz",
"callback_url":"https://xyz.com/",
"pe_id":NULL,
"template_id":NULL
}


Response Format for Both GET AND POST

Post Request JSON Format
{
"message_id": 4125,
"status": "S",
"remarks": "Message Submitted Successfully" ,
“uid”: “xyz”
}

Response Parameter Description

Parameter Name Description
message_id System Generated Message ID
status S = Submitted
F = Failed to Submit
remarks Description of the status
uid Reference Value as given

CallBack URL Response Details

Post Request JSON Format
{
"message_id": 32,
"PhoneNumber": "9713254",
"SMSMessage": "Test Message",
"MessageType": "Default",
"MessageLength": 159,
"MessageParts": 1,
"ClientCost": 1,
"DLRStatus": "Delivered",
"SMSID": "9cbd20a1-0cd8-420e-b384-5767b7df7a87",
"ErrorCode": 0,
"ErrorDescription": "000",
"SentDateUTC": "2017-05-05T10:16:39.523",
"Remarks": "OK" ,
“uid” : “xyz”
}

Callback url Parameter Description

Parameter Name Description
message_id Message ID of the request
PhoneNumber Phone Number to which message was sent
SMSMessage Text of the SMS message
MessageType Message Encoding
MessageLength Length of Message
MessageParts No of Message parts
ClientCost Amount Deducted from account
DLRStatus Delivery Status Can Be One Of the following
1. Pending
2. Delivered
3. Undeliverable
4. Acknowledged
5. Expired
6. Accepted
7. Rejected
8. Unknown
9. Failed
10. DND
SMSID Carrier Generated SMS ID
ErrorCode Error Code If Any
ErrorDescription Error Description If Any
SentDateUTC SMS Sent Date Time in UTC (Universal Time Coordinate)
Remarks Remarks for the Request
uid Reference parameter as you submit with sms

Query Delivery Report / Message Status

You can Add Number to Contact List, Get Contact List ID, and Delete Number from Contact List.

API URL for Getting Delivery Status

https://api.smsala.com/api/GetDeliveryStatus


Getting Delivery Status [Parameters]

Parameter Name Required Description Example
message_id Conditional Message ID You Received at The Time of Submit (Not Required if your are using uid parameter) 4134
Uid Conditional Reference value as you sent and received at the time of submit message xyz
api_id Yes Your API ID Sent in Email & you can get it from your customer panel too API0896731286
api_password Yes Your API Password Received in the email or can change API password from customer panel [email protected]

Calling Delivery Report API Using GET Request

https://api.smsala.com/api/GetDeliveryStatus?api_id=API123&api_password=123xyz&message_id=2323&uid=xyz


Calling Delivery Report API Using POST Request

Post Request JSON Format

{
“api_id” : “API123”,
“api_password” : “123”
" message_id ": 32423,
“uid” : “xyz”
}


API Response Format

Both GET AND POST

{
"message_id": 32,
"PhoneNumber": "9713254",
"SMSMessage": "Test Message",
"MessageType": "Default",
"MessageLength": 159,
"MessageParts": 1,
"ClientCost": 1,
"DLRStatus": "Delivered",
"SMSID": "9cbd20a1-0cd8-420e-b384-5767b7df7a87",
"ErrorCode": 0,
"ErrorDescription": "000",
"SentDateUTC": "2017-05-05T10:16:39.523",
"Remarks": "OK" ,
“uid” : “xyz”
}

Response Parameter Details

Parameter Name Description
message_id Message ID of the request
PhoneNumber Phone Number to which message was sent
SMSMessage Text of the SMS message
MessageType Message Encoding
MessageLength Length of Message
MessageParts No of Message parts
ClientCost Amount Deducted from account
DLRStatus Delivery Status Can Be One Of the following
1. Pending
2. Delivered
3. Undeliverable
4. Acknowledged
5. Expired
6. Accepted
7. Rejected
8. Unknown
9. Failed
10. DND
SMSID Carrier Generated SMS ID
ErrorCode Error Code If Any
ErrorDescription Error Description If Any
SentDateUTC SMS Sent Date Time in UTC (Universal Time Coordinate)
Remarks Remarks for the Request
uid Reference parameter as you submit with sms

Managing Contact Lists through API

You can Add Number to Contact List, Get Contact List ID, and Delete Number from Contact List.

Add Number to Contact List through API [Parameters]

Parameter Name Required Description Example
api_id Yes Your API ID Sent in Email & you can get it from your customer panel too API0896731286
api_password Yes Your API Password Received in the email or can change API password from customer panel [email protected]
contact_list_id Yes Create Contact List in Customer Panel and Get the ID from There See Image Below for Detailed Explanation 1
contact_name Yes Name of the person you want to save John
contact_number Yes Contact Number of the person you want to save 919990785632

How to Get Contact List ID

Step 1. Login in your Customer Panel At https://my.smsala.com.
Step 2. Go to Contact List in The Left Side Menu Bar.
Step 3. Click on Add New Contact List Button & Create a new Contact List
image
Step 4. Enter Contact List Name and Click Create New Contact List
image
Step 5 : Once Created You Will Find Contact List ID in the Grid Below
image
Yellow Color Highlighted Is Your Contact List ID


Calling Contact List API using GET REQUEST

https://api.smsala.com/api/AddContact?api_id=API3434144906&api_password=password&contact_list_id=1&contact_name=Test&contact_number=919990206824

Calling Contact List API using POST REQUEST

https://api.smsala.com/api/AddContact

Post Request JSON Format

{
"api_id": yourapiid,
"api_password": yourapipassword,
"contact_list_id": 1,
"contact_name": Test,
"contact_number": 91999020238,
}

Response Format for Both GET AND POST

{
"contact_id": 4,
"status": "S",
"remarks": "Contact Created Sucessfully"
}

Response Parameter Details

Parameter Name Description
contact_id System generated id of your contact save it for future deletion of this contact via api.
status S = Contact Created Successfully
F = Failed to create contact
remarks Description of the status

Deleting Number from Contact List using API [Parameters]

Parameter Name Required Description Example
api_id Yes Your API ID Sent in Email & you can get it from your customer panel too API0896731286
api_password Yes Your API Password Received in the email or can change API password from customer panel [email protected]
contact_id Yes Contact ID You Have Get While Creating the contact from api 123

Calling Delete Contact Using API Get Request

https://api.smsala.com/api/DeleteContact?api_id=API4das62144906&api_password=password&contact_id=4

Calling Delete Contact Using API POST Request

https://api.smsala.com/api/DeleteContact

Post Request JSON Format

{
"api_id": yourapiid,
"api_password": yourapipassword,
"contact_id ": 1,
}

Response Format for Both GET AND POST

{
"contact_id": 0,
"status": "S",
"remarks": "Contact Deleted Successfully"
}

Response Parameter Details

Parameter Name Description
contact_id Value Will Always Be Zero
status S = Contact Deleted Successfully
F = Failed to delete contact
remarks Description of the status

SMSala Verify API - Sending OTP Verification SMS

This API helps you to verify user phone number using OTP (One Time Password).

Calling the SMSala Verify API using Get Request

https://api.smsala.com/api/Verify?api_id=API651344002&api_password=password&brand=SMSALA&phonenumber=91340206824&sender_id=SMSALA

Calling the SMSala Verify API using POST Request

https://api.smsala.com/api/Verify

Post Request JSON Format

{
"api_id": yourapiid,
"api_password": yourapipassword,
"brand": SMSALA,
"phonenumber": 91999664445,
"sender_id": SMSALA,
}

Response Format for Both GET AND POST

{
"contact_id": 0,
"status": "S",
"remarks": "Verification Code Sent Successfully"
}

Response Parameter Details

Parameter Name Description
verfication_id System generated id of your verification request save it to check the verification status
status S = Verification SMS Sent Successfully
F = Failed to send verification SMS
remarks Description of the status

Checking Verification Status

This API helps you to verify user phone number using OTP (One Time Password).

Checking the verification Status Using Get Request

https://api.smsala.com/api/VerifyStatus?verfication_id=2&verfication_code=4022

Checking the verification Status Using post Request

https://api.smsala.com/api/VerifyStatus

Post Request JSON Format

{
"verfication_id": 2,
"verfication_code": 4022,
}

Response Format for Both GET AND POST

{
"verfication_id": 2,
"status": "F",
"remarks": "Verification Code is Not Verified"
}

Response Parameter Details

Parameter Name Description
verfication_id Verification ID You Sent in the Request
status S = Verification Successfully
F = verification Failed
remarks Description of the status

Conversion Tracking for Retail Customer

Conversion Tracking for Retail Customer Using GET Request

https://api.smsala.com/api/[email protected]&status=true&message_id=452

Conversion Tracking for Retail Customer Using POST Request

https://api.smsala.com/api/CTrack

Post Request JSON Format

{
"api_id": "API537199541",
"api_password": "[email protected]",
"status": "true",
"message_id": 452
}

Response Format for Both GET AND POST

ERROR Code:
ErrorCode = 1000; ErrorDescription = "OK"
ErrorCode = 1001; ErrorDescription = "api_id not specified";
ErrorCode = 1002; ErrorDescription = "api_password not specified";
ErrorCode = 1003; ErrorDescription = "Invalid api_id";
ErrorCode = 1004; ErrorDescription = "Invalid api_password";
ErrorCode = 1005; ErrorDescription = "status not specified";
ErrorCode = 1006; ErrorDescription = "Invalid status";
ErrorCode = 1007; ErrorDescription = "message_id not specified";
ErrorCode = 1008; ErrorDescription = "Invalid message_id";
ErrorCode = 1009; ErrorDescription = "message_id already updated";
}


Conversion Tracking for Retail Customer

Conversion Tracking for Retail Customer Using GET Request

https://api.smsala.com/api/CTrackWS?system_id=test_SM1&password=QWE#2314&status=true&message_id=452

Conversion Tracking for Retail Customer Using POST Request

https://api.smsala.com/api/CTrackWS

Post Request JSON Format

{
"system_id": "SMPPUSERNAME",
"password": " SMPPpassword",
"status": "true",
"message_id": 253428
}

Response Format for Both GET AND POST

ErrorCode = 1000; ErrorDescription = "OK"
ErrorCode = 1001; ErrorDescription = "system_id not specified";
ErrorCode = 1002; ErrorDescription = "password not specified";
ErrorCode = 1003; ErrorDescription = "Invalid system_id";
ErrorCode = 1004; ErrorDescription = "Invalid password";
ErrorCode = 1005; ErrorDescription = "status not specified";
ErrorCode = 1006; ErrorDescription = "Invalid status";
ErrorCode = 1007; ErrorDescription = "message_id not specified";
ErrorCode = 1008; ErrorDescription = "Invalid message_id";
ErrorCode = 1009; ErrorDescription = "message_id already updated";
}


Sender ID Request (API)

Sender ID Using GET Request

https://api.smsala.com/api/SenderIDRequest?api_id=youapiid&api_password=yourapipassword&sender_id=yoursenderid&country=yourcountryname&remarks=remarks

Sender ID Using POST Request

https://api.smsala.com/api/SenderIDRequest

{
"api_id" : "Your API ID",
"api_password" : "Your API Password",
"sender_id": "Desired Sender ID",
"country" : "Desired Country Name",
"remarks" : "Remarks Related To Sender ID"
}

Sender ID Reponse JSON for GET and POST Request

{
"status": "S",
"remarks": "Sender ID Request Created Sucessfully"
}

Response Parameter Details

Parameter Name Description
status S = S (Successful)
F = F (Failed)

Get Sender ID List (API)

Get Sender ID List Using GET Request

https://api.smsala.com/api/GetSenderIDList?api_id=youapiid&api_password=yourapipassword

Get Sender ID List Using POST Request

https://api.smsala.com/api/GetSenderIDList

{
"api_id" : "Your API ID",
"api_password" : "Your API Password",
}

Sender ID Reponse JSON for GET and POST Request

[
{
"sender_id": "SMS UPDATE",
"country": "United Arab Emirates"
},
{
"sender_id": "SMSALA",
"country": "United Arab Emirates"
}
]


Check Balance (API)

Check Balance Using GET Request

https://api.smsala.com/api/CheckBalance?api_id=yourapiid&api_password=yourapipassword

Check Balance Using POST Request

https://api.smsala.com/api/CheckBalance

{
"api_id" : "Your API ID",
"api_password" : "Your API Password",
}

Sender ID Reponse JSON for GET and POST Request

{
"BalanceAmount": "balance amount in decimal",
"CurrenceCode ": "amount currence code"
}


Receive Incoming (API) [Parameters]

Parameter Name Required Example
ChannelNumber Yes 2222222
MessageText Yes Text msg
IncomingNumber Yes 91xxxxxx1234
Circle No xyz
Operator No xyz
Time No 0

Note: All parameters are dynamic , you have to set parameter name in incoming vendor in admin panel and use the same parameters name as you mention for the same.

Receive Incoming GET Request

https://api.smsala.com/api/ReceiveIncoming?ChannelNumber=22222&MessageText=testmsg&IncomingNumber=9123123211212

Receive Incoming POST Request

https://api.smsala.com/api/ReceiveIncoming

For SMSALA V2 : Post Json data
{
"ChannelNumber": 2222222,
"MessageText": “test” ,
"IncomingNumber": 12323123123
}

For SMSALA V3 : Post Form data

Receive Incoming Response for GET and POST Request

Response Details: Success / Bad Request
Auto Post: Receive data in Request Form Body
Content Type: application/json
Received Parameters: IncomingNumber, MessageText, ChannelNumber, Keyword


Sender ID Status (API) [Parameters]

Parameter Name Required Example
api_id Yes API123
api_password Yes 123xyz
request_id Yes 1234

Sender ID Status GET Request

https://api.smsala.com/api/SenderIDStatus?api_id=API123&api_password=123&request_id=123

Sender ID Status POST Request

https://api.smsala.com/api/SenderIDStatus

Post Json data
{
"api_id": “API123”,
"api_password": “wd123” ,
"request_id": 123
}

Sender ID Status Response for GET and POST Request

Failed:
{
“request_id”:123,
“status”: ”F”,
“remarks”: “API Password Is Invalid”
}
Success:
{
“request_id”: 123,
“company_name”: ”acdsa”,
“country”: ”india”,
“sender_id”: ”TST”,
“status”: “Approved”,
“created_time”: ”2021-05-20 15:30:49.730”,
“approval_time” : ”2021-05-20 15:30:49.730”,
“request_deleted”: 0
}


Send Voice OTP (API) [Parameters]

Parameter Name Required Example
api_id Yes API123
api_password Yes 123xyz
phonenumber Yes 91xxxxxx1234
otp_code Yes 1234

Send Voice OTP GET Request

https://api.smsala.com/api/SendVoiceOTP?api_id=API123&api_password=123&phonenumber=98123123123&otp_code=123

Send Voice OTP POST Request

https://api.smsala.com/api/SendVoiceOTP

Post Json data
{
"api_id": “API123”,
"api_password": “wd123” ,
"phonenumber": 123234234123,
“otp_code” : 123
}

Send Voice OTP Response for GET and POST Request

{
“message_id”:123,
“status”: ”S”,
“remarks”: “Submitted Successful”
}


Voice OTP Status (API) [Parameters]

Parameter Name Required Example
api_id Yes API123
api_password Yes 123xyz
message_id Yes 12345

Voice OTP Status GET Request

https://api.smsala.com/api/VoiceOTPStatus?api_id=API123&api_password=123&message_id=123

Voice OTP Status POST Request

https://api.smsala.com/api/VoiceOTPStatus

Post Json data
{
"api_id": “API123”,
"api_password": “wd123” ,
"message_id": 123
}

Voice OTP Status Response for GET and POST Request

{
“PhoneNumber”:91******56,
“status”: ”Delivered”,
“OTP”: “123”,
“Remarks”:”OK”,
“JobDetailID”:123
}