We created a new viewing experience for our SMS API documentation. It's now all in one central location. Click here to check it out!

This method will allow you to send multiple SMS without the requirement of the recipient being on one of your contact lists. This method does not accept custom variables, to achieve that you will have to upload users in a contact list and send to that.


Parameters:


  • mobile - string (numbers only) - recipients mobile number in INTERNATIONAL format.
  • message - string - the sms body, user variables are not available in this method.
  • caller_id - string - required in one of the two following formats:
    • numeric - up to 15 numeric characters (e.g. your mobile number if you want replies to come straight to your phone).
    • string - maximum of 11 characters, a-z, 0-9 and _ are valid characters, no spaces.
  • sendtime - integer - Unix Timestamp in GMT for when to send the message. If not supplied the message is sent immediately
  • contact_list - integer - specify a contact list id if you want to save this number to that list
  • replies_to_email - string - specify a email from one of your Email SMS addresses to receive replies to this message
  • validity - integer - the maximum number of minutes to attempt sending the message (1-4320)


Return result:


  • status - message queue status. could be :
    • queued: message added to queue and ready for sending
    • verification required: message added but will not be send until approved by site support
    • verification rejected: message was rejected by site support and will not be sent
  • contact_list_addition - contact list ID if added.
  • message_id - ID of new message
  • total_recipients - total recipients quantity
  • total_recipients_queued - actual recipients quantity


 




 




XML Request Example


<?xml version='1.0'?>

<request>

	<version>0.3</version>

	<key>API_KEY</key>

	<secret>API_SECRET</secret>

	<method>messages.multiple</method>

	<params>

		<mobile>614xxxxxxx,6140xxxxxxx</mobile>

		<message>Hi!</message>

		<caller_id>614xxxxxxx</caller_id>

		<sendtime />

		<contact_list />

	</params>

</request>







XML Response Example


<?xml version='1.0'?>

<xml>

	<method>messages.multiple</method>

	<total>1</total>

	<time>2009-12-10 06:09:15 GMT</time>

	<timestamp>1260425355 GMT</timestamp>

	<data>

		<result>queued</result>

		<total_recipients>2</total_recipients>

		<total_recipients_queued>2</total_recipients_queued>

		<contact_list_addition>no list provided</contact_list_addition>

		<message_id>123456</message_id>

	</data>

</xml>







PHP Example


Download the PHP API Client


<?php



// change api key and secret to your own

$myAPIKey = "API_KEY";

$myAPISecret = "API_SECRET";



// include base class

require('APIclient.php');



// create new client object

$transmitsmsAPI = new transmitsmsAPI($myAPIKey, $myAPISecret);



// set parameters

$mobileIntFormat = "614xxxxxxx,6140xxxxxx";

$body = 'my sms body';

$caller_id = 'John';



// execute request

$methodResponse = $transmitsmsAPI->SMSMulti($mobileIntFormat, $body, $caller_id);



// parse response into xml object

$xml = @simplexml_load_string($methodResponse);



echo ((string) $xml->data->message == 'queued') ? "Message was added" : "Message was not added: " . (string) $xml->data->message;



?>