XML API Documentation | Rat SMS
loader image

XML API

Home / XML API
DLT News: DLT is now live and accounts that have added Entity ID/Registration ID and DLT-approved headers can send messages. Read more...   Rat SMS is one of 3 bulk SMS aggregators with direct operator connectivity from Airtel, Jio, VodaIdea & BSNL in Chennai.

WE GUIDE YOU

XML API

SMS XML API allows you to integrate our sms service to your own web based / stand alone applications.

$xml = '

  Account key
  Message
  Sender id
  Route
  Number
  Number 2
';

$xml = urlencode($xml);
https://login.ratsms.com/api/smsxml?xml=$xml

#
ParameterDescription
Example
1keyYour account API key
fa5c5ab0b0d15f25c2c0e7b2e56d1eb5
2senderSender idALERTS
3numberDestination numbers99XXXXXXXX,98XXXXXXXX
4routeRoute you want to send SMS ( Transactional – 1, Promo SID – 2, Promotional – 3, Promo DND – 4, Trans OTP – 6)2
5smsSMS content (Url encoded)Hello user

Error Codes

  • 101 : Invalid user
  • 102 : Invalid sender ID
  • 103 : Invalid contact(s)
  • 104 : Invalid route
  • 105 : Invalid message
  • 106 : Spam blocked
  • 107 : Promotional block
  • 108 : Low credits in the specified route
  • 109 : Promotional route will be working from 9am to 8:45pm only

* A numeric value other than these error codes is the unique message id for the sent slot. Keep this message id for delivery report.

Delivery Report API

SMS Delivery Report API allows you to get delivery report of a slot sent via Api as JSON format.

$xml = '

  Account key
  Unique id
';

$xml = urlencode($xml);
https://login.ratsms.com/api/dlrxml?xml=$xml

#
ParameterDescription
Example
1keyYour account API key
fa5c5ab0b0d15f25c2c0e7b2e56d1eb5
2messageidUnique message id returned by SMS Api987650
  • Error Codes

    • 101 : Invalid user
    • 110 : Invalid message id

* A successive API return a JSON file containing the sent destination numbers with delivery report

Sample XML will be like

Number
  Status
  
 
 
  Number 2
  Status 2
  
 

Credits Check API

Available credits API allows you to get currently available credits of a given route.

$xml = '

 Account key
 Route
';

$xml = urlencode($xml);
https://login.ratsms.com/api/creditxml?xml=$xml

#ParameterDescriptionExample
1keyYour account API keyfa5c5ab0b0d15f25c2c0e7b2e56d1eb5
2routeRoute you want to check credits ( Transactional – 1, Promo SID – 2, Promotional – 3, Promo DND – 4, Trans OTP – 6)2

Error Codes

  • 101 : Invalid user
  • 104 : Invalid route

* A successive api return a JSON file containing the route name and credits

Sample XML will be like

Route
  Available credits
error: Do not copy to avoid Legal Issue!! Content is protected and we are actively monitoring your IP.