Textlocal Logo

API Documentation

Send SMS via Bulk XML API

We also offer a bulk XML interface for sending different messages to multiple recipients in bulk. This option is perfect for mail-merging text. We recommend no more than 500 tags in each submission.

Resource URL


Sample Request

$xmlData = '
<Account apikey="Your apiKey" Test="0" Info="1" JSON="0">
<Sender From="Site 3" Sched="2012-01-21-14-59-00" rcpurl="http://yourdomain/yourreceiptscript.123">
<Msg ID="15" Number="447123456789">
<Msg ID="16" Number="447987654321">
$post = 'data='. urlencode($xmlData); 
$url = "https://api.txtlocal.com/xmlapi.php";
$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, $url); 
curl_setopt($ch, CURLOPT_POST ,1); 
curl_setopt($ch, CURLOPT_POSTFIELDS ,$post); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER ,1); 
$data = curl_exec($ch); 
echo $data; 

Caution: Some users opt to place their request inside a code loop, while testing we highly recommend setting the test parameter to true, as occasionally an infinite loop can occur and users can consume all their credits very quickly.


Test Set to 1 to send the XML in test mode - no SMS will actually be transmitted
Info Set to 1 to receive a response from our servers with details about your request.
JSON Receive the information above in JSON structured format.
Number The destination mobile phone number of the message - max 14 digits.
Text The message body.
Login Parameters (Additional Information)
apiKey You can create these in your Messenger Control Panel (click here) for each application, and limit the usage of them by host IP Address.
Optional Parameters
From The FROM address of the message up to 14 digits, or 11 alphanumeric characters.
Sched A scheduled delivery time for the message in (2012-01-21-14-59-00) format. We recommend not using this parameter, and despatch the messages live from your servers when required.
rcpurl Set a delivery receipt URL for this batch of messages. All delivery confirmation receipts will be POSTed to this URL.
ID A unique identifier for each message that will be displayed n your web reports, and/or POSTed back in the delivery receipt URL.

* Post your requests to http://www.textlocal.com/xmlapi.php
* Use 1 'SMS' tag per submission
* Each message should be contained in a 'Msg' tag
* If necessary, specify the custom ID in the 'ID' property
* If necessary, specify a receipt notification URL in the 'rcpurl' property

Note: To activate International Sending please contact Textlocal Support on 01244 573 247 or support@textlocal.com