Developer Province

Developer API (SMPP / HTTP)

Sending SMS

# API Service URL For Sending SMS
  URL http://smatsms.com/api/send/
  Request Type HTTP_POST or HTTP_GET
  Spec URL encode all request

# Parameter Description
       user Account username
  pass Account password
  from SMS SenderID
(must <= 11chars for Alphanumerical)
(must <= 16chars for Numerical)
  to Destination number(s)
(must be in international format and no prefix e.g. 234819*******)
Separate with comma if you are sending to multiple recipients e.g. 234805******* , 234803*******
  msg SMS Message content (must <= 905chars)
  type (optional) Message Format
0 = Normal SMS
1 = Flash SMS
2 = Unicode SMS (Arabic, Chinese etc)

# API Example - Single Recipient
       POST or GET http://smatsms.com/api/send/? user=demo&pass=demopass&to=2348030000000&from=Testing&msg=Testing
# API Example - Multiple Recipients
       POST or GET http://smatsms.com/api/send/? user=demo&pass=demopass&to=2348030000000,2348030000011,2348030000022&from=Testing&msg=Testing

Checking Credit

# API Service URL For Checking Credit Balance
  URL http://smatsms.com/api/credit/
  Request Type HTTP_POST or HTTP_GET
  Spec URL encode all request

# Parameter Description
  user Account username
  pass Account password

# API Example
       POST or GET http://smatsms.com/api/credit/?user=demo&pass=demopass

Checking Delivery Status

This is only avaibale for customers who are subscribed to the DLR API interface.

# API Service URL For Checking Message Delivery Status
  URL http://smatsms.com/api/report/
  Request Type HTTP_POST or HTTP_GET
  Spec URL encode all request

# Parameter Description
  user Account username
  pass Account password
  msgid Message ID

# API Example
       POST or GET http://smatsms.com/api/report/?user=demo&pass=demopass&msgid=ida3685a6b319

Receiving (2-Way) SMS

To use this feature, you will need to purchase an inbound (MO) number. Then provide us with your URL for the inbound (MO) messages. All incoming messages from your shortcode would be routed to this URL.

# Inbound SMS Service URL
  URL http://ClientApplicationURL.com
  Request Type HTTP_POST or HTTP_GET
  Spec All URL requests will be ‘URLencoded’

# Parameter Description
  sender Mobile number of originating SMS
  message Full message content
  datetime Time is sent in Epochtime format

# API Example
       POST or GET http://ClientApplicationURL.com/?sender=234819*******&message=Hello&datetime=1334739315

API Response

All SmatSMS Messaging APIs return a response in json format. The HTTP (RESTful) API returns one of the following HTTP status codes.

#    API Response Description
1 sent Message(s) have been sent successfully
2 error_param You have supplied incomplete parameter to the url or one of the required parameter is missing
3 error_credit Insufficient credit
3 error_billing We were unable to debit your account. Ususally a temporary error message.
4 error_gw Gateway is down, busy or not responding
5 error_user Invalid user or user has been suspended
6 error_limit Exceed maximum number limit for bulk/batch sending. The maximum limit on the API is currently 20,000 numbers at a single call.
# Message IDs - Applicable only if you have message ID response enabled on your account
       number,message_id Sample response is 2348030000000,4b1d777e.
Tilde (~) will be used to seperate multiple destination numbers. e.g 2348030000000,4b1d777e~2348030000011,47e63835

Direct SMPP Connection

If you require a direct SMPP connection, we also provide you with SMPP connection details. Please Contact Us to get more information.

SMPP Connection :: Response / Error Codes

# SMPP Response/ Error Codes
  0x00000000 Success
  0x00000400 Message Not Routeable
  0x00000401 Out of Credit
  0x00000402 Maximum Credit Exceeded
  0x00000403 Account Frozen
  0x00000404 Bad Data
  0x00000405 ESME Client Error
  0x0000040a Subscriber on DND or Restricted SenderID
  0x00000430 Invalid Payload Length. Used to Limit Short_message and Message_payload to GSM PDU Length.
  0x00000431 Internal Error
  0x00000432 Restricted PDU. Means Message Denied in SPAM Filter
  0x00000433 DCS Inconsistency. Which Means the the Data_coding Value Does not Seem to Match the Encoding in the Payload.
  0x000004ff Internal Error
  0x00000045 Subscriber on DND
  0x00000058 Throughput Exceeded