Phone: +91 (80) 4171 8750 Email: info@foosms.com

XML API

XML interface for sending SMS..
  • Home
  • /
  • Resources
  • /
  • XML API

We offer the simple, most reliable, flexible and easily adaptable XML API. This document provides a reference for all features available to you via the XML interface for sending SMS.

XML API For Sending Single SMS

* In the password field either account password or api_password can be used.

$data="<?xml version='1.0' encoding='utf-8'?>
<MESSAGE>
<USER USERNAME='username' PASSWORD='password'/>
<SMS TEXT='Hi, this is a test message.' MESGTYPE='' SENDER='WEBSMS' PRIORITY='11' />
<ADDRESS TO='XXXXXXXXXX' />
</SMS>
</MESSAGE>";

$data=urlencode($data);

http://sms.foosms.com/xmlapi.php?data=$data

XML API For Sending Multiple SMS

$data="<?xml version='1.0' encoding='utf-8'?>
<MESSAGE>
<USER USERNAME='username' PASSWORD='password'/>
<SMS TEXT='Hi, this is a test message.' MESGTYPE='' SENDER='WEBSMS' PRIORITY='11' >
<ADDRESS TO='XXXXXXXXXX' />
<ADDRESS TO='XXXXXXXXXX' />
<ADDRESS TO='XXXXXXXXXX' />
<ADDRESS TO='XXXXXXXXXX' />
<ADDRESS TO='XXXXXXXXXX' />
</SMS>
</MESSAGE>";

$data=urlencode($data);

http://sms.foosms.com/xmlapi.php?data=$data

*To get xml output use the parameter xmloutput=1

eg:- http://sms.foosms.com/xmlapi.php?data=$data&xmloutput=1

* Use attribute PRIORITY in Element to select credit type (4 - Promotional , 8 - Transaction , 11 - Enterprise , 12 - Scrub).

* Use attribute MESGTYPE='0' for Normal Text Messge, MESGTYPE='1' for Unicode and MESGTYPE='2' for Flash in Element to select message type.

* eg: <SMS TEXT='Hi, this is a test message.' MESGTYPE='0' SENDER='TEST' PRIORITY='1' >

* Use &apos; to use single quotes

API to fetch DLR Status

To fetch Single DLR

http://sms.foosms.com/fetchdlr.php?username=your_username&msgid=message_id

To fetch Multiple DLR's

http://sms.foosms.com/fetchdlr.php?username=your_username&msgid=message_id1,message_id2,message_id3

*To get xml output use the parameter xmloutput=1

http://sms.foosms.com/fetchdlr.php?username=your_username&msgid=message_id&xmloutput=1