Home
Register Free
Login
SMS Pricing (Bulk SMS)
SMS Short Code (Shared)
SMS Short Code (Dedicated)
SMS 5676775
CDMA / GSM Software
IVR Solution
Managed Short Code
GSM GPRS Modem
Developers API
Two-way SMS
Reseller Program
Special Offers & News
Payment Options
Knowledge Base
Create Support Request
API Documentation (Single SMS via HTTP)
  
Note on HTTP connections: please limit yourself to one concurrent connection, i.e., in your code, send with only one thread/process.
  

URL (Single SMS): 

http://api.znisms.com/post/message.asp?userid=joinus& pwd=abcd1234&messageid= Your+Message & senderid=9123123456&sendto=9123123457&flash=no

  

URL (for sandbox testing)*:

http://api.znisms.com/post/sandbox.asp?userid=joinus &pwd=abcd1234&messageid= Your+Message & senderid=9123123456&sendto=9123123457&flash=no

 

Required parameters:

  • userid: your ZNI username
  • pwd: your ZNI password
  • messageid: max 154 chars for text
  • senderid: mobile no. or name (Max. 11 characters) from which you want to send SMS. (we do not recommend alphanumeric sender id as many of operators don't support this feature, so your account will be charged without delivering the message)
  • sendto: any valid mobile no. without +91 or 91 or 0 (only 10 digit mobile no.)
  • flash: You can flash your message to recipient mobile. To flash the message kindly use the parameter flash=yes (NO CAPS). You can send maximum of 70 characters in a flash message.

* SandBox URL can be used for testing purpose i.e. to check how our API will respond to your queries without utilizing any credits from your account. It's a dummy API with all the functionalities of the original URL but you can't send SMS from this. 

  

Returns:

status_description:status_code #message_id

Possible values for status_code are:

  • 20: Account Locked
  • 21: Account Expired
  • 22: Internal fatal error 
  • 23: Authentication failure 
  • 24: Data validation failed 
  • 25: You do not have sufficient credits 
  • 26: Upstream credits not available 
  • 27: You have exceeded your daily quota 
  • 28: Upstream quota exceeded 
  • 40: Temporarily unavailable
  • 50: Message submitted to SMSC for delivery.
    • E.g.: Message Sent! Success: 50 #100001

    100001 is the message number which you just submitted.

Note: you should attempt to resend if you receive status code 40. You could also do so if you receive 26 or 28, which might have been resolved after several resend attempts. All other errors should be considered fatal.

Any HTTP status code other than 200 should be considered transient, i.e. you should attempt to resend after some interval.

The current url is:  http://api.znisms.com/post/message.asp

 

Limitations:

  • SMS can't be send on a CDMA (Reliance mobile) with a alphanumeric sender id
  • SMS cant't be send on a Reliance Mobile from another Reliance mobile or landline number
  • All PDU (binary) format SMS are blocked currently or may charged more then one SMS credit i.e. you can't send Ringtones, Operator Logos, Picture Message from this API.
  • Only 70 characters allowed in a flash message.
  • Do not use any mobile number as a sender id (CLI) for GSM mobiles as it is not allowed as per TRAI notification.

NOTE: While using 10 digit no as a sender ID, Please keep in mind that it should be a valid mobile number and should be owned by you. We will not take any guarantee of delivery if, the number used in the sender id field is not a valid number.

Please note these limitations are imposed by the SMSC and not by us.

 

Check your balance via URL

http://api.znisms.com/crinfo/crinfo.asp?userid=your-userid&pwd=your-password

  

Check Delivery Report via URL

http://api.znisms.com/crinfo/drinfo.asp?userid=your-userid& pwd=password&msgid=100001

  • userid: your znisms userid
  • pwd: your znisms password
  • msgid: ID returned by our HTTP URL

Returns:

  • Message ID#Delivered
  • Message ID#Submitted
  • Message ID#Failed-0
 

How to use HTTP API main URL and Backup URL (ASP Example)

Kindly test the following example before implementing on a production server. This example is provided to give you just an overview of how to implement our API in your application. No support will be provided for this example. For more information on ServerXMLHTTP please click here.

<%
Dim objXmlHttpMain, objXmlHttpBackup
Set objXmlHttpMain = Server.CreateObject("Msxml2.ServerXMLHTTP")
on error resume next
objXmlHttpMain.open "GET", "Put API URL Here", False
objXmlHttpMain.setRequestHeader "Content-Type", "text/urlencoded"
objXmlHttpMain.send
if err.number <> 0 then
err1 = err.description
end if
if objXmlHttpMain.status >= 400 and objXmlHttpMain.status <= 599 then
'**********Now trying backup url******************
Set objXmlHttpBackup = Server.CreateObject("Msxml2.ServerXMLHTTP")
on error resume next
objXmlHttpBackup.open "GET", "Put Backup API URL Here", False
objXmlHttpBackup.setRequestHeader "Content-Type", "text/urlencoded"
objXmlHttpBackup.send
if err.number <> 0 then
err1 = err.description
end if
if objXmlHttpBackup.status >= 400 and objXmlHttpBackup.status <= 599 then

msg = "Both Gateways are down, Please try after some time."

else

if objXmlHttpBackup.status = 200 then
msg = "Message Delivered Successfully via Backup Gateway"
else
msg = "Error Occurred, Please consult ZNISMS at sms.zni.in@gmail.com" 
end if

end if
'********* End of Backup URL********************
else
if objXmlHttp.status = 200 then
msg = "Message Delivered Successfully"
else
msg = "Some Error Occurred"
end if
response.write = msg
end if
%>

 
Service Used For?
Sending customized SMS from an application or website
 
 
ZNI Telecom Blog | Tushaar.com | Free SMS Service | Dedicated Hosting | Domain Registration | Shopping Cart | AUP