<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Text Marketer - Email SMS, Bulk SMS Gateway, SMS Marketing Blog &#187; Documentation</title>
	<atom:link href="http://www.textmarketer.co.uk/blog/category/documentation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.textmarketer.co.uk/blog</link>
	<description>SMS Gateway</description>
	<lastBuildDate>Tue, 07 Feb 2012 09:50:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How Much Does It Cost to Send a Text to 88802 or a TxtUs Number?</title>
		<link>http://www.textmarketer.co.uk/blog/2011/05/sms-marketing-ideas/how-much-does-it-cost-someone-to-text-to-88802-or-a-txtus-number/</link>
		<comments>http://www.textmarketer.co.uk/blog/2011/05/sms-marketing-ideas/how-much-does-it-cost-someone-to-text-to-88802-or-a-txtus-number/#comments</comments>
		<pubDate>Wed, 25 May 2011 07:42:55 +0000</pubDate>
		<dc:creator>Henry</dc:creator>
				<category><![CDATA[All Bulk SMS Account Documentation]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Short Code SMS]]></category>
		<category><![CDATA[SMS Marketing Ideas & Advice]]></category>
		<category><![CDATA[short code sms]]></category>

		<guid isPermaLink="false">http://www.textmarketer.co.uk/blog/?p=2762</guid>
		<description><![CDATA[How much does it cost someone to send a text to 88802? It will cost them one text at their normal network rate. What exactly that is will depend on the individual&#8217;s network and tariff but is likely to be in the range of 8-12 pence. Sending a text to &#8230; <a href="http://www.textmarketer.co.uk/blog/2011/05/sms-marketing-ideas/how-much-does-it-cost-someone-to-text-to-88802-or-a-txtus-number/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h3>How much does it cost someone to send a text to 88802?</h3>
<p>It will cost them one text at their normal network rate. What exactly that is will depend on the individual&#8217;s network and tariff but is likely to be in the range of 8-12 pence.  Sending a text to a short code is not included in a free text bundle tariff. So it will always cost 8 &#8211; 12 pence regardless of the network and tariff.</p>
<h3>How much does it cost to send a text to a Txtus, virtual mobile number?</h3>
<p>Texts sent to virtual mobile numbers cost one text at the sender&#8217;s standard rate. Texts are included in monthly free text allowance, so people on contracts will probably pay nothing at all. Pay as you go customers will be charged 8 &#8211; 12 pence depending on the network they&#8217;re using.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<img src="http://www.textmarketer.co.uk/wordpress/?ak_action=api_record_view&id=2762&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.textmarketer.co.uk/blog/2011/05/sms-marketing-ideas/how-much-does-it-cost-someone-to-text-to-88802-or-a-txtus-number/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>REST SMS Gateway API  groups resource</title>
		<link>http://www.textmarketer.co.uk/blog/2011/04/business-sms/rest-sms-gateway-api-%e2%80%93-groups-resource/</link>
		<comments>http://www.textmarketer.co.uk/blog/2011/04/business-sms/rest-sms-gateway-api-%e2%80%93-groups-resource/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 15:14:37 +0000</pubDate>
		<dc:creator>Jay</dc:creator>
				<category><![CDATA[Business SMS]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.textmarketer.co.uk/blog/?p=2438</guid>
		<description><![CDATA[groups &#160; This blog post has been superseded with our website documentation This resource allows you list send groups. This document is referred to by the REST SMS Gateway API &#8211; Specification Document. Resource URI: http://www.textmarketer.biz/services/rest/groups Actions relating to send groups. GET method - Used to list all available groups &#160; GET method Lists all &#8230; <a href="http://www.textmarketer.co.uk/blog/2011/04/business-sms/rest-sms-gateway-api-%e2%80%93-groups-resource/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div>
<div>
<h2><em><strong>groups</strong></em></h2>
<p>&nbsp;</p>
<p><a href="http://www.textmarketer.co.uk/developers/restful-api.htm">This blog post has been superseded with our website documentation</a></p>
<p>This resource allows you list send groups.</p>
<p>This document is referred to by the <a title="API specification" href="/blog/2010/03/business-sms/rest-sms-api-specification-document/">REST SMS Gateway API &#8211; Specification Document</a>.</p>
<p><em><strong>Resource URI:</strong></em></p>
<pre>http://www.textmarketer.biz/services/rest/groups</pre>
<p>Actions relating to send groups.</p>
<ul>
<li><a title="post method" href="#get">GET method</a> - Used to list all available groups</li>
</ul>
<p>&nbsp;</p>
<p><a id="get"></a><em><strong>GET method</strong></em></p>
<p>Lists all the available send groups, and the STOP groups.</p>
<p>Example usage:</p>
<pre>http://www.textmarketer.biz/services/rest/groups</pre>
<p>Example POST response:</p>
<pre id="line1">&lt;response processed_date="2011-04-07T14:43:59+01:00"&gt;
	&lt;groups quantity="2" &gt;
		&lt;group name="short_ZDZY" numbers="0" id="1" is_stop="true"/&gt;
		&lt;group name="MyGroup" numbers="0" id="2" is_stop="false"/&gt;
	&lt;/groups&gt;
&lt;/response&gt;</pre>
<ul>
<li>quantity &#8211; the number of groups</li>
<li>name &#8211; the group name</li>
<li>numbers &#8211; the quantity of numbers in the group</li>
<li>id &#8211; the group&#8217;s unique ID</li>
<li>is_stop &#8211; whether or not this is a STOP group</li>
</ul>
<p><a title="REST SMS API DTD specification and  documentation" href="http://www.textmarketer.biz/services/rest/DTD/" target="_self">Read the advanced specification of this response</a>.</p>
<p>&nbsp;</p>
<p>Example PHP code:</p>
<pre>
<div>Under development</div>
</pre>
<p>&nbsp;</p>
</div>
</div>
<p>&nbsp;</p>
<img src="http://www.textmarketer.co.uk/wordpress/?ak_action=api_record_view&id=2438&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.textmarketer.co.uk/blog/2011/04/business-sms/rest-sms-gateway-api-%e2%80%93-groups-resource/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>REST SMS Gateway API &#8211; group resource</title>
		<link>http://www.textmarketer.co.uk/blog/2011/04/sms-gateway/rest-sms-gateway-api-group-resource/</link>
		<comments>http://www.textmarketer.co.uk/blog/2011/04/sms-gateway/rest-sms-gateway-api-group-resource/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 14:42:15 +0000</pubDate>
		<dc:creator>Jay</dc:creator>
				<category><![CDATA[All SMS Gateway Documentation]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.textmarketer.co.uk/blog/?p=2429</guid>
		<description><![CDATA[group This resource allows you to view and modify a send group. This blog post has been superseded with our website documentation This document is referred to by the REST SMS Gateway API &#8211; Specification Document. Resource URI: http://www.textmarketer.biz/services/rest/group Actions relating to send groups. POST method - Used to add number(s) to a group. &#160; &#8230; <a href="http://www.textmarketer.co.uk/blog/2011/04/sms-gateway/rest-sms-gateway-api-group-resource/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div>
<h2><em><strong>group</strong></em></h2>
<p>This resource allows you to view and modify a send group.<br />
<a href="http://www.textmarketer.co.uk/developers/restful-api.htm">This blog post has been superseded with our website documentation</a><br />
This document is referred to by the <a title="API specification" href="/blog/2010/03/business-sms/rest-sms-api-specification-document/">REST SMS Gateway API &#8211; Specification Document</a>.</p>
<p><em><strong>Resource URI:</strong></em></p>
<pre>http://www.textmarketer.biz/services/rest/group</pre>
<p>Actions relating to send groups.</p>
<ul>
<li><a title="post method" href="#post">POST method</a> - Used to add number(s) to a group.</li>
</ul>
<p>&nbsp;</p>
<p><a id="post"></a><em><strong>POST method</strong></em></p>
<p>Attempts to add a number or numbers to a group.</p>
<p>Example usage:</p>
<pre>http://www.textmarketer.biz/services/rest/group</pre>
<p>Post arguments:</p>
<table border="0">
<tbody>
<tr>
<td width="100px"><strong>parameter</strong></td>
<td><strong>usage</strong></td>
</tr>
<tr>
<td>id</td>
<td>the ID of the group to add to (optional &#8211; if you use &#8216;name&#8217; instead)</td>
</tr>
<tr>
<td>name</td>
<td>the name of the group to send to &#8211; case-sensitive (optional &#8211; if you use &#8216;id&#8217; instead)</td>
</tr>
<tr>
<td>numbers</td>
<td>a comma-separated list of numbers to add to the group</td>
</tr>
</tbody>
</table>
<p>NOTE: If you specify a group by it&#8217;s name, and the name is not unique, the first matched group will be used.</p>
<p>Example POST response:</p>
<pre id="line1">&lt;response processed_date="2011-04-07T14:57:00+01:00"&gt;
&lt;added quantity="1"&gt;
&lt;number&gt;447777000001&lt;/number&gt;
&lt;/added&gt;
&lt;stopped quantity="0"&gt;&lt;/stopped&gt;
&lt;duplicates quantity="1"&gt;
&lt;number&gt;447777000002&lt;/number&gt;
&lt;/duplicates&gt;
&lt;/response&gt;</pre>
<ul>
<li>quantity &#8211; the number of added/stopped/duplicate numbers</li>
<li>added &#8211; a list of numbers successfully added to the group</li>
<li>stopped &#8211; a list of numbers that were not added to the group since they are members of a STOP group</li>
<li>duplicates &#8211; a list of numbers that were not added to the group since they are already members of the group</li>
</ul>
<p><a title="REST SMS API DTD specification and  documentation" href="http://www.textmarketer.biz/services/rest/DTD/" target="_self">Read the advanced specification of this response</a>.</p>
<p>Specific error codes:</p>
<table border="0">
<tbody>
<tr>
<td width="100px"><strong>Code</strong></td>
<td><strong>Meaning</strong></td>
</tr>
<tr>
<td>0</td>
<td>the group ID or name was not specified or was invalid</td>
</tr>
<tr>
<td>1</td>
<td>group ID or name did not correspond to any known group</td>
</tr>
<tr>
<td>2</td>
<td>no numbers were supplied for adding to the group</td>
</tr>
<tr>
<td>3</td>
<td>a number was not of a valid format</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Example XML error response:</p>
<pre id="line1">&lt;response processed_date="2011-04-07T15:04:19+01:00"&gt;
&lt;errors&gt;
	&lt;error code="1"&gt;Group not found&lt;/error&gt;
&lt;/errors&gt;
&lt;/response&gt;</pre>
<p>Example PHP code:</p>
<pre>
<div>&lt;?php</div>
<div>/**</div>
<div>* POST request on the 'group' resource (add numbers to group)</div>
<div>*/</div>
<div>$url = 'http://www.textmarketer.biz/services/rest/group';</div>
<div>// for testing:</div>
<div>$url = 'http://sandbox.textmarketer.biz/services/rest/group';</div>
<div>$username = 'myAPIusername'; // CHANGE THIS!!!</div>
<div>$password = 'myAPIpassword'; // CHANGE THIS!!!</div>
<div>$groupName = 'MyGroupName'; // CHANGE THIS!!</div>
<div>$numbersToAdd = '447777000001,447777000002'; // CHANGE THIS!!</div>
<div>$data = array('name'=&gt;$groupName, 'numbers'=&gt;'$numbersToAdd',</div>
<div>'username'=&gt;$username, 'password'=&gt;$password);</div>
<div>$data = http_build_query($data, '', '&amp;');</div>
<div>// we're using the curl library to make the request</div>
<div>$curlHandle = curl_init();</div>
<div>curl_setopt($curlHandle, CURLOPT_URL, $url);</div>
<div>curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, true);</div>
<div>curl_setopt($curlHandle, CURLOPT_POSTFIELDS, $data);</div>
<div>curl_setopt($curlHandle, CURLOPT_POST, 1);</div>
<div>$responseBody = curl_exec($curlHandle);</div>
<div>$responseInfo  = curl_getinfo($curlHandle);</div>
<div>curl_close($curlHandle);</div>
<div></div>
<div>// deal with the response</div>
<div>if ($responseInfo['http_code']==200)</div>
<div>{</div>
<div>$xml_obj = simplexml_load_string($responseBody);</div>
<div>// do something with the result</div>
<div>$xml_added = $xml_obj-&gt;added;</div>
<div>$atts = $xml_added-&gt;attributes();</div>
<div>$added = (integer) $atts-&gt;quantity;</div>
<div>echo "$added added";</div>
<div>} else {</div>
<div>// handle the error here</div>
<div>var_dump($responseInfo);</div>
<div>var_dump($responseBody);</div>
<div>}</div>
<div>?&gt;</div>
</pre>
<p><span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace;"><span style="font-size: 12px; line-height: 18px; white-space: pre;"><br />
</span></span></p>
</div>
<img src="http://www.textmarketer.co.uk/wordpress/?ak_action=api_record_view&id=2429&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.textmarketer.co.uk/blog/2011/04/sms-gateway/rest-sms-gateway-api-group-resource/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>c# code example</title>
		<link>http://www.textmarketer.co.uk/blog/2011/03/technical/c-code-example/</link>
		<comments>http://www.textmarketer.co.uk/blog/2011/03/technical/c-code-example/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 09:31:32 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.textmarketer.co.uk/blog/?p=2279</guid>
		<description><![CDATA[Attached is a C# example &#8211; a generic method called SendSMS() for calling the SMS Gateway service and an example of it being called. Included is XML parsing for the returned responses. The API spec can be found here Sending SMS using C#, example code]]></description>
			<content:encoded><![CDATA[<p><!-- p.p1 {margin: 0.0px 0.0px 12.0px 0.0px; font: 10.0px Arial} -->Attached is a C# example &#8211; a generic method called SendSMS() for calling the SMS Gateway service and an example of it being called. Included is XML parsing for the returned responses.</p>
<p><a href="http://www.textmarketer.co.uk/blog/2010/03/business-sms/rest-sms-api-specification-document/" target="_blank">The API spec can be found here</a></p>
<p><a href="http://www.textmarketer.co.uk/blog/wp-content/uploads/2011/03/CSharp_SMS1.rtf">Sending SMS using C#, example code</a></p>
<img src="http://www.textmarketer.co.uk/wordpress/?ak_action=api_record_view&id=2279&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.textmarketer.co.uk/blog/2011/03/technical/c-code-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Integrating Goldmine with our SMS Gateway</title>
		<link>http://www.textmarketer.co.uk/blog/2011/03/sms-gateway/integrating-goldmine-with-our-sms-gateway/</link>
		<comments>http://www.textmarketer.co.uk/blog/2011/03/sms-gateway/integrating-goldmine-with-our-sms-gateway/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 16:09:29 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[All SMS Gateway Documentation]]></category>
		<category><![CDATA[Business SMS]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[gateway]]></category>
		<category><![CDATA[goldmine]]></category>
		<category><![CDATA[messages]]></category>
		<category><![CDATA[send]]></category>
		<category><![CDATA[sms]]></category>
		<category><![CDATA[text]]></category>

		<guid isPermaLink="false">http://www.textmarketer.co.uk/blog/?p=2276</guid>
		<description><![CDATA[How to integrate Goldmine software with our SMS Gateway The 2 easiest methods of integrating Goldmine with our SMS Gateway are using; 1) The email to SMS gateway &#8211; http://www.textmarketer.co.uk/email-to-sms-gateway/email-sms.htm Or 2) The HTTP gateway &#8211; http://www.textmarketer.co.uk/blog/2009/05/sms-gateway/text-marketer-apigateway-spec/ &#160; &#160;]]></description>
			<content:encoded><![CDATA[<h2>How to integrate Goldmine software with our SMS Gateway</h2>
<p>The 2 easiest methods of integrating Goldmine with our SMS Gateway are using;</p>
<p>1) The email to SMS gateway &#8211; <a href="http://www.textmarketer.co.uk/email-to-sms-gateway/email-sms.htm">http://www.textmarketer.co.uk/email-to-sms-gateway/email-sms.htm</a><br />
Or<br />
2) The HTTP gateway &#8211; <a href="http://www.textmarketer.co.uk/blog/2009/05/sms-gateway/text-marketer-apigateway-spec/">http://www.textmarketer.co.uk/blog/2009/05/sms-gateway/text-marketer-apigateway-spec/</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<img src="http://www.textmarketer.co.uk/wordpress/?ak_action=api_record_view&id=2276&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.textmarketer.co.uk/blog/2011/03/sms-gateway/integrating-goldmine-with-our-sms-gateway/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the txtUs 2-way Text Messaging feature</title>
		<link>http://www.textmarketer.co.uk/blog/2011/02/documentation/using-the-txtus-2-way-text-messaging-feature/</link>
		<comments>http://www.textmarketer.co.uk/blog/2011/02/documentation/using-the-txtus-2-way-text-messaging-feature/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 11:56:39 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[All Bulk SMS Account Documentation]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[2-way]]></category>
		<category><![CDATA[reply]]></category>
		<category><![CDATA[response]]></category>
		<category><![CDATA[sms]]></category>
		<category><![CDATA[txtUs]]></category>

		<guid isPermaLink="false">http://www.textmarketer.co.uk/blog/?p=2172</guid>
		<description><![CDATA[Using txtUs dedicated virtual mobile numbers for your business A txtUs number gives your business a dedicated virtual mobile number which people can text (but cannot call) enquiries to or to reply to messages you send out to them from your system. You can add as many txtUs numbers to &#8230; <a href="http://www.textmarketer.co.uk/blog/2011/02/documentation/using-the-txtus-2-way-text-messaging-feature/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.textmarketer.co.uk/blog/wp-content/uploads/2011/02/TxtUsLogo_mini.gif"><img class="size-full wp-image-2173 alignnone" title="TxtUsLogo_mini" src="http://www.textmarketer.co.uk/blog/wp-content/uploads/2011/02/TxtUsLogo_mini.gif" alt="" width="114" height="40" /></a></p>
<h3>Using txtUs dedicated virtual mobile numbers for your business</h3>
<p>A txtUs number gives your business a dedicated virtual mobile number which people can text (but cannot call) enquiries to or to reply to messages you send out to them from your system.</p>
<p>You can add as many txtUs numbers to your account as you wish and they can each have bespoke settings which can be a great solution for a small office environment or call centre where each member of staff could have their own txtUs number for their clients.</p>
<p><a onclick="_gaq.push(['_trackEvent', 'Videos', 'txtUsDemoPlay', 'Blog Page'])" href="/txtUsDemo.flv" rel="shadowbox;height=480;width=854"><img class="tight" src="/images/icon-video.gif" alt="" width="58" height="56" /></a><a onclick="_gaq.push(['_trackEvent', 'Videos', 'txtUsDemoPlay', 'Blog Page'])" href="/txtUsDemo.flv" rel="shadowbox;height=480;width=854">A quick 2 min Video Demo of the 2 main uses</a> | <a title="SMS Marketing Videos" href="/sms-marketing-videos.htm">See more videos</a></p>
<p>The unique advantage of the txtUs system is that the full conversation between you and each mobile number is sent to you via email and you simply reply via email. In essence, to answer the &#8216;how does it work?&#8221; question &#8230;. exactly like your email does. The only difference being of course that your replies are being sent out the customer as text messages.</p>
<h3>Step 1 &#8211; Adding a txtUs number to your account</h3>
<p>Login to your account. If you don&#8217;t have an account, you can set one up <a href="http://www.textmarketer.co.uk/signUpGoogle/">here</a>.<br />
Go to <strong>&#8220;Incoming SMS&#8221; | &#8220;Add a txtUs reply number&#8221;</strong>. Simply choose the number you want and press Place Order. This will take you through the Google Checkout system to set up the subscription payment for your txtUs number.</p>
<p>NEW! <a href="http://www.textmarketer.co.uk/blog/2011/09/sms-marketing-articles/buy-keywords-on-our-shortcode-service-or-txtus-numbers-pay-by-invoice-instead-of-card/">You can also pay for your txtUs number by recurring invoice rather than with a card</a></p>
<p><a href="http://www.textmarketer.co.uk/blog/wp-content/uploads/2011/02/Fullscreen-capture-18022011-111326.bmp.jpg"><img class="alignnone size-full wp-image-2179" title="Add a txtUs mobile number" src="http://www.textmarketer.co.uk/blog/wp-content/uploads/2011/02/Fullscreen-capture-18022011-111326.bmp.jpg" alt="" width="480" height="287" /></a></p>
<p>Your subscription may be cancelled at any time in your Google account and you have complete control of all payments.</p>
<h3>Step 2 &#8211; Applying the settings for your txtUs number</h3>
<p>Go to &#8220;Incoming SMS&#8221; | &#8220;Change reply settings&#8221; then click &#8220;Configure&#8221; next to your txtUs number. You will be presented with the screen below.</p>
<p><img class="alignnone size-full wp-image-2180" title="txtUs settings screen" src="http://www.textmarketer.co.uk/blog/wp-content/uploads/2011/02/Fullscreen-capture-18022011-111945.bmp.jpg" alt="" width="480" height="290" /></p>
<p>- <strong>Auto reply by SMS settings</strong> &#8211; If you would like to automatically send a text message back when somebody texts your txtUs number, you can set it here. Simply change active to &#8216;Y&#8217;, enter your text message and press submit.<br />
<em><span style="color: #ff0000;"><strong>IMPORTANT NOTE</strong></span>: The text autoresponse is only sent once to any individual mobile number, the first time they text in. This is to avoid them receiving the same autoresponse message over and over if you get into a conversation with them.</em></p>
<p>- <strong>Reply settings</strong> &#8211; This is where you set how your system handles the text conversations you have via email;</p>
<ul>
<li>Active &#8211; set to N if you do not wish to have incoming texts emailed to you</li>
<li>E-mail &#8211; set the email address you wish incoming texts to go to.</li>
<li>Thread Count &#8211; This is the amount of history you want included on each conversation email. For example, if you wanted to see the last 5 messages from a person and the last 5 replies you sent them you would set it to 10.</li>
<li>Use as Sender default &#8211; enable this if you want your txtUs number to be the default reply number for text messages you send out from your system</li>
</ul>
<p>- <strong>Advanced (API) settings</strong> &#8211; only used for programmers to deliver incoming message data to a script URL. Please leave this inactive unless you are sure of what you&#8217;re doing.</p>
<h3>Step 3 &#8211; Testing your new txtUs number / Seeing a conversation in action</h3>
<p>Send a text message to your new txtUs number then, if enabled, check your email inbox on the email address you have set (if it doesn&#8217;t come pretty instantly, check any spam filters or folders you may have enabled). You will see you have a new message from yourself.</p>
<p>Now reply to that email in the normal way (as you would an email). The only difference being you must end the message you send back with ##. This tells our system that it&#8217;s the end of the reply and so doesn&#8217;t send all the history contained in the email below.</p>
<p>You will then receive the reply on your phone. If you reply back again, check your email again you will now see the conversation thread developing.</p>
<p>Below is a conversation thread email for example from a company confirming a meeting:</p>
<p>You can also see the <a href="http://www.textmarketer.co.uk/blog/2011/12/sms-marketing-articles/txtus-virtual-mobile-number-now-has-names/">name of the person texting in if they are in your Address Book</a>.</p>
<div class="mceTemp" style="text-align: left;">
<dl id="attachment_3877" class="wp-caption alignnone" style="width: 650px;">
<dt class="wp-caption-dt"><a href="http://www.textmarketer.co.uk/wordpress/wp-content/uploads/2011/02/Fullscreen-capture-16122011-100222.bmp.jpg"><img class="size-full wp-image-3877 " style="border-image: initial; border-width: 1px; border-color: black; border-style: solid;" title="sms to email" src="http://www.textmarketer.co.uk/wordpress/wp-content/uploads/2011/02/Fullscreen-capture-16122011-100222.bmp.jpg" alt="SMS to email text reply" width="640" height="328" /></a></dt>
<dd class="wp-caption-dd">If your contacts&#8217; names and numbers are in your address book, the name of the person replying will also be shown.</dd>
</dl>
</div>
<p>&nbsp;</p>
<h3>Step 4 &#8211; Promoting your new txtUs number</h3>
<p><strong><span style="color: #ff0000;">Congratulations!</span></strong> Now you are a text enabled business and you can promote your number as you would your telephone number, fax number or email address. See how we do on our <a href="http://www.textmarketer.co.uk/sms_enquiry_form.htm" target="_blank">enquiries page</a>. As a customer, you are free to use the <a href="http://www.textmarketer.co.uk/img/TxtUslogo.png">txtUs logo</a> next to your number which adds impact and encourages use.</p>
<h3>Other Common Questions</h3>
<p><strong>Getting replies from text campaigns</strong><br />
To enable people to reply to you, you simply have to set the <a href="http://www.textmarketer.co.uk/blog/2009/07/system-faqs/can-i-set-the-sender-name-who-the-message-is-from/">Sender ID</a> as your txtUs number. When you have a txtUs number your account will automatically do this as the default, which you can change if you wish.</p>
<p>You will see a new setting on your send screens, &#8220;Use Reply Number&#8221;. Simply tick this to use your txtUs number:</p>
<p><a href="http://www.textmarketer.co.uk/blog/wp-content/uploads/2011/02/Fullscreen-capture-18022011-115429.jpg"><img class="alignnone size-full wp-image-2183" title="Fullscreen capture 18022011 115429" src="http://www.textmarketer.co.uk/blog/wp-content/uploads/2011/02/Fullscreen-capture-18022011-115429.jpg" alt="" width="480" height="288" /></a></p>
<p><strong>Charges</strong><br />
You are only charged for messages you send out, not for incoming messages. The cost of this is just 1 credit per 160 characters as per normal charges.</p>
<p><strong>Cancellation</strong><br />
You can cancel your number at any time. There are no fixed contract lengths. To do this simply log in to your <a href="http://checkout.google.com">Google Checkout Account</a> and cancel your subscription payments.</p>
<p><strong>Logs</strong><br />
All of your conversations are stored in a log. Go to <strong>&#8220;Incoming SMS&#8221; | &#8220;Reply Data&#8221;</strong> to download your full log for your txtUs number.</p>
<img src="http://www.textmarketer.co.uk/wordpress/?ak_action=api_record_view&id=2172&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.textmarketer.co.uk/blog/2011/02/documentation/using-the-txtus-2-way-text-messaging-feature/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Cancel a Keyword on SMS Short Code 88802 or txtUs Subscription</title>
		<link>http://www.textmarketer.co.uk/blog/2010/10/text-messaging-response/how-to-cancel-a-keyword-on-sms-short-code-88802/</link>
		<comments>http://www.textmarketer.co.uk/blog/2010/10/text-messaging-response/how-to-cancel-a-keyword-on-sms-short-code-88802/#comments</comments>
		<pubDate>Tue, 12 Oct 2010 07:28:27 +0000</pubDate>
		<dc:creator>Henry</dc:creator>
				<category><![CDATA[All Bulk SMS Account Documentation]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Text Messaging Response]]></category>
		<category><![CDATA[short code sms]]></category>
		<category><![CDATA[sms short code]]></category>
		<category><![CDATA[text response]]></category>

		<guid isPermaLink="false">http://www.textmarketer.co.uk/blog/?p=1879</guid>
		<description><![CDATA[All our short code services are run by subscription and we use Google Checkout as the subscription processor. You can cancel your keyword or TxtUs number from within your Text Marketer account. To do this this go to Incoming SMS &#8211; Change Reply Settings. Click Cancel next to the keyword &#8230; <a href="http://www.textmarketer.co.uk/blog/2010/10/text-messaging-response/how-to-cancel-a-keyword-on-sms-short-code-88802/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>All our short code services are run by subscription and we use <a title="google checout" href="http://checkout.google.com" target="_blank">Google Checkout </a>as the subscription processor.</p>
<p>You can cancel your keyword or TxtUs number from within your Text Marketer account.<br />
To do this this go to <strong>Incoming SMS</strong> &#8211; <strong>Change Reply Settings</strong>.<br />
Click <strong>Cancel</strong> next to the keyword or TxtUs number.<br />
You&#8217;ll then be asked to confirm that you wish to cancel the subscription.<br />
By confirming, you subscription will immediately be cancelled.</p>
<p>You can also cancel you subscription by logging in directly to your Google account.</p>
<p>To do this, simply <a title="google checkout" href="http://checkout.google.com" target="_blank">login </a>to your Google account and cancel your subscription with Google. Text Marketer does not hold your Google login or credit card details. See<a href="https://checkout.google.com/support/bin/answer.py?hl=en-uk&amp;answer=1090911"> Google Help</a> for more information.</p>
<p>As soon as your monthly payment has been cancelled your keyword will automatically be removed from your account.</p>
<p>Please note that if you need to download data from the <a title="short code sms" href="http://www.textmarketer.co.uk/blog/2009/07/system-faqs/ive-got-a-keyword-set-up-on-a-short-code-how-do-i-access-the-incoming-texts/" target="_self">short code log</a>, do this before cancelling your keyword as the data cannot be retrieved once a keyword has been cancelled.</p>
<img src="http://www.textmarketer.co.uk/wordpress/?ak_action=api_record_view&id=1879&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.textmarketer.co.uk/blog/2010/10/text-messaging-response/how-to-cancel-a-keyword-on-sms-short-code-88802/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>REST SMS Gateway API &#8211; keywords resource</title>
		<link>http://www.textmarketer.co.uk/blog/2010/06/sms-gateway/rest-sms-gateway-api-keywords-resource/</link>
		<comments>http://www.textmarketer.co.uk/blog/2010/06/sms-gateway/rest-sms-gateway-api-keywords-resource/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 13:48:01 +0000</pubDate>
		<dc:creator>Jay</dc:creator>
				<category><![CDATA[All SMS Gateway Documentation]]></category>
		<category><![CDATA[Business SMS]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://87.106.109.73/blog/?p=1545</guid>
		<description><![CDATA[This blog post has been superseded with our website documentation keywords This document is referred to by the REST SMS Gateway API &#8211; Specification Document. Resource URI: http://www.textmarketer.biz/services/rest/keywords/mykeyword Actions on the ShortCode keywords (see Short Code SMS Service). GET method &#8211; get the availability of a given keyword GET method Test whether the specified &#8230; <a href="http://www.textmarketer.co.uk/blog/2010/06/sms-gateway/rest-sms-gateway-api-keywords-resource/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.textmarketer.co.uk/developers/restful-api.htm">This blog post has been superseded with our website documentation</a></p>
<h2><em><strong>keywords</strong></em></h2>
<p>This document is referred to by the <a title="API specification" href="/blog/2010/03/business-sms/rest-sms-api-specification-document/">REST SMS Gateway API &#8211; Specification Document</a>.</p>
<p><em><strong><span style="font-style: normal;"><span style="font-weight: normal;">Resource URI:</span></span></strong></em></p>
<pre>http://www.textmarketer.biz/services/rest/keywords/mykeyword</pre>
<p>Actions on the ShortCode keywords (see <a href="http://www.textmarketer.co.uk/shortcode_sms.htm" target="_blank">Short Code SMS Service</a>).</p>
<ul>
<li><a title="get method" href="#get">GET method</a> &#8211; get the availability of a given keyword</li>
</ul>
<p><a id="get"></a><em><strong>GET method</strong></em></p>
<p>Test whether the specified keyword is available on our ShortCode number.</p>
<p><a title="resource ID" href="/blog/2010/03/business-sms/rest-sms-api-specification-document/#resource_identifier">RESOURCE_ID</a>: the keyword of which to test the availability, e.g. &#8216;mykeyword&#8217; in the example above</p>
<p><strong>Example usage</strong></p>
<pre>http://www.textmarketer.biz/services/rest/keywords/buyit</pre>
<p>will test whether &#8216;buyit&#8217; is an available keyword.</p>
<p><strong>Example GET response</strong></p>
<pre>&lt;<span class="start-tag">response</span><span class="attribute-name"> processed_date</span>=<span class="attribute-value">"2010-05-06T13:43:18+02:00"</span>&gt;
&lt;<span class="start-tag">available</span>&gt;true&lt;/<span class="end-tag">available</span>&gt;
&lt;<span class="start-tag">recycle</span>&gt;false&lt;/<span class="end-tag">recycle</span>&gt;
&lt;/<span class="end-tag">response</span>&gt;</pre>
<p>The &lt;available&gt; tag shows whether the keyword is available (true/false) and the &lt;recycle&gt; tag shows whether the keyword<em> </em>is available through &#8216;recycling&#8217; a disused keyword, i.e. one that was in use previously.</p>
<p><a title="REST SMS API DTD specification and documentation" href="http://www.textmarketer.biz/services/rest/DTD/" target="_self">Read the advanced specification of this response</a>.</p>
<p><strong>Specific error codes</strong></p>
<p>N/A</p>
<p><strong>Example PHP code</strong></p>
<pre>&lt;?php
/**
 * GET request on the 'keywords' resource
 */
$url = 'http://www.textmarketer.biz/services/rest/keywords/mykeywordtest'; // CHANGE THIS!!!
$username = 'myAPIusername'; // CHANGE THIS!!!
$password = 'myAPIpassword'; // CHANGE THIS!!!
$url = "$url?username=$username&amp;password=$password";

// we're using the curl library to make the request
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, true);
$responseBody = curl_exec($curlHandle);
$responseInfo  = curl_getinfo($curlHandle);
curl_close($curlHandle);

// deal with the response
if ($responseInfo['http_code']==200)
{
	$xml_obj = simplexml_load_string($responseBody);
	$available =  $xml_obj-&gt;available == 'true';
	$recycled =  $xml_obj-&gt;recycle == 'true';
	// do something with the result
	if ($available)
		echo "Available ";
	else
		echo "Unavailable ";

	if ($recycled)
		echo "(recycled)";

} else {
	// handle the error
	var_dump($responseBody);
}
?&gt;</pre>
<img src="http://www.textmarketer.co.uk/wordpress/?ak_action=api_record_view&id=1545&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.textmarketer.co.uk/blog/2010/06/sms-gateway/rest-sms-gateway-api-keywords-resource/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>REST SMS Gateway API &#8211; sms resource</title>
		<link>http://www.textmarketer.co.uk/blog/2010/06/sms-gateway/rest-sms-gateway-api-sms-resource/</link>
		<comments>http://www.textmarketer.co.uk/blog/2010/06/sms-gateway/rest-sms-gateway-api-sms-resource/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 13:44:59 +0000</pubDate>
		<dc:creator>Jay</dc:creator>
				<category><![CDATA[All SMS Gateway Documentation]]></category>
		<category><![CDATA[Business SMS]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://87.106.109.73/blog/?p=1541</guid>
		<description><![CDATA[This blog post has been superseded with our website documentation sms This resource deals with sending SMS to customer. This document is referred to by the REST SMS Gateway API &#8211; Specification Document. Resource URI: http://www.textmarketer.biz/services/rest/sms Actions relating to sending SMS messages. POST method - Used to send an SMS message. POST POST method Attempts &#8230; <a href="http://www.textmarketer.co.uk/blog/2010/06/sms-gateway/rest-sms-gateway-api-sms-resource/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.textmarketer.co.uk/developers/restful-api.htm">This blog post has been superseded with our website documentation</a></p>
<h2><em><strong>sms</strong></em></h2>
<p>This resource deals with sending SMS to customer.</p>
<p>This document is referred to by the <a title="API specification" href="/blog/2010/03/business-sms/rest-sms-api-specification-document/">REST SMS Gateway API &#8211; Specification Document</a>.</p>
<p><em><strong><span style="font-style: normal;"><span style="font-weight: normal;">Resource URI:</span></span></strong></em></p>
<pre>http://www.textmarketer.biz/services/rest/sms</pre>
<p>Actions relating to sending SMS messages.</p>
<ul>
<li><a title="post method" href="#post">POST method</a> - Used to send an SMS message.</li>
</ul>
<p style="color:white">POST</p>
<p><a id="post"></a><em><strong>POST method</strong></em></p>
<p>Attempts to send the specified SMS message.</p>
<p>Example usage:</p>
<pre>http://www.textmarketer.biz/services/rest/sms</pre>
<p>Post arguments:</p>
<table border="0">
<tbody>
<tr>
<td width="100px"><strong>parameter</strong></td>
<td><strong>usage</strong></td>
</tr>
<tr>
<td>message</td>
<td>the content of the message to be sent, up to 612 characters (see <a title="SMS Message concatination" href="#concatination" target="_self">Concatination below</a>) in the GSM alphabet. The GSM alphabet is a subset of ISO-8859-1. The SMS GSM characters we can support is <a title="GSM Character Set" href="http://www.textmarketer.co.uk/blog/2009/07/bulk-sms/supported-and-unsupported-characters-in-text-messages-gsm-character-set/" target="_blank">documented here</a></td>
</tr>
<tr>
<td>mobile_number</td>
<td>the mobile number of the recipient, in international format, e.g. 447777777777</td>
</tr>
<tr>
<td>originator</td>
<td>a string or international mobile number of the sender to be displayed to the recipient</td>
</tr>
<tr>
<td>username*</td>
<td>(optional) required if not using HTTP Digest authentication</td>
</tr>
<tr>
<td>password*</td>
<td>(optional) required if not using HTTP Digest authentication</td>
</tr>
</tbody>
</table>
<p>* Can be found by logging in to your account, Settings-&gt;API Settings</p>
<p style="color:white">CONCATENATION</p>
<p><a id="concatination"></a><strong><em>CONCATENATION</em></strong></p>
<p>If you exceed 160 characters you automatically invoke concatenation sending, this has the following consequences: Each message consists of a 153 character chunk, i.e. no longer 160 chars; the extra characters are used to glue the messages together. Therefore a message that is 307 characters long will require 3 messages to send (153 + 153 + 1).</p>
<p>Example POST response:</p>
<pre>&lt;response processed_date="2010-03-23T10:31:39+00:00"&gt;
	&lt;message_id&gt;4172870907&lt;/message_id&gt;
	&lt;credits_used&gt;1&lt;/credits_used&gt;
&lt;/response&gt;</pre>
<ul>
<li>message_id &#8211; the unique message ID attributed to the sent SMS</li>
<li>credits_used &#8211; the number of credits used to send the SMS</li>
</ul>
<p><a title="REST SMS API DTD specification and  documentation" href="http://www.textmarketer.biz/services/rest/DTD/" target="_self">Read the advanced specification of this response</a>.</p>
<p>Specific error codes:</p>
<table border="0">
<tbody>
<tr>
<td width="100px"><strong>Code</strong></td>
<td><strong>Meaning</strong></td>
</tr>
<tr>
<td>0</td>
<td>message refused by the operator</td>
</tr>
<tr>
<td>1</td>
<td>bad username or password</td>
</tr>
<tr>
<td>2</td>
<td>no more credits</td>
</tr>
<tr>
<td>3</td>
<td>invalid originator or too long</td>
</tr>
<tr>
<td>4</td>
<td>invalid or missing originator</td>
</tr>
<tr>
<td>5</td>
<td>invalid message or too long</td>
</tr>
<tr>
<td>6</td>
<td>you do not have enough credits for this message</td>
</tr>
<tr>
<td>7</td>
<td>invalid message or missing</td>
</tr>
<tr>
<td>8</td>
<td>message contains unsupported characters (listed in error message)</td>
</tr>
<tr>
<td>9</td>
<td>invalid number or too short</td>
</tr>
<tr>
<td>10</td>
<td>invalid number or not an integer</td>
</tr>
</tbody>
</table>
<p style="color:white">CONCATENATION</p>
<p>Example XML error response:</p>
<pre><span style="color: #cc0000;"><span style="color: #000000;">&lt;response processed_date="2010-03-24T14:37:41+00:00"&gt;
&lt;errors&gt;
	&lt;error code="10"&gt;invalid number or not an integer&lt;/error&gt;
	&lt;error code="9"&gt;invalid number or too short&lt;/error&gt;
&lt;/errors&gt;
&lt;/response&gt;</span>

</span></pre>
<p>Example PHP code:</p>
<pre>&lt;?php
/**
 * POST request on the 'sms' resource (send an SMS)
 */
$url = 'http://www.textmarketer.biz/services/rest/sms';
//$url = 'http://sandbox.textmarketer.biz/services/rest/sms';

$username = 'myAPIusername'; // CHANGE THIS!!!
$password = 'myAPIpassword'; // CHANGE THIS!!!

$data = array('message'=&gt;'hello','mobile_number'=&gt;'447777123123', 'originator'=&gt;'me',
	'username'=&gt;$username, 'password'=&gt;$password);
$data = http_build_query($data, '', '&amp;');
// we're using the curl library to make the request
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curlHandle, CURLOPT_POSTFIELDS, $data);
curl_setopt($curlHandle, CURLOPT_POST, 1);
$responseBody = curl_exec($curlHandle);
$responseInfo  = curl_getinfo($curlHandle);
curl_close($curlHandle);

// deal with the response
if ($responseInfo['http_code']==200)
{
	$xml_obj = simplexml_load_string($responseBody);
	// do something with the result
	echo "Message ID: $xml_obj-&gt;message_id\n";
	echo "Credits used: $xml_obj-&gt;credits_used\n";

	var_dump($responseBody);

} else {
	// handle the error
	var_dump($responseInfo);
	var_dump($responseBody);
}
?&gt;</pre>
<p><strong>NOTE</strong></p>
<p>It is important to understand the difference between the status of a message in a <a title="Delivery Report" href="/blog/2010/06/sms-gateway/rest-sms-gateway-api-deliveryreport-resource/" target="_self">delivery report</a>, and getting a success or failure when using the API to send a message. A success response from the SMS send only confirms that the number and message appear to be in the correct format &#8211; this does not mean that the number actually exists, or that the message was received by the recipient. Delivery reports, however, confirm to you what has actually happened to the sent message. See the <a title="Delivery Reports" href="/blog/2010/06/sms-gateway/rest-sms-gateway-api-deliveryreport-resource/" target="_self">deliveryReport</a> resource.</p>
<img src="http://www.textmarketer.co.uk/wordpress/?ak_action=api_record_view&id=1541&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.textmarketer.co.uk/blog/2010/06/sms-gateway/rest-sms-gateway-api-sms-resource/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>REST SMS Gateway API &#8211; deliveryReport resource</title>
		<link>http://www.textmarketer.co.uk/blog/2010/06/sms-gateway/rest-sms-gateway-api-deliveryreport-resource/</link>
		<comments>http://www.textmarketer.co.uk/blog/2010/06/sms-gateway/rest-sms-gateway-api-deliveryreport-resource/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 13:37:15 +0000</pubDate>
		<dc:creator>Jay</dc:creator>
				<category><![CDATA[All SMS Gateway Documentation]]></category>
		<category><![CDATA[Business SMS]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://87.106.109.73/blog/?p=1535</guid>
		<description><![CDATA[This blog post has been superseded with our website documentation deliveryReport This document is referred to by the REST SMS Gateway API &#8211; Specification Document. Resource URI: http://www.textmarketer.biz/services/rest/deliveryReport Actions on a specific delivery report. GET method - Gets the contents of a delivery report An individual delivery report shows the current known status of all messages &#8230; <a href="http://www.textmarketer.co.uk/blog/2010/06/sms-gateway/rest-sms-gateway-api-deliveryreport-resource/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.textmarketer.co.uk/developers/restful-api.htm">This blog post has been superseded with our website documentation</a></p>
<h2><em><em><strong>deliveryReport</strong></em></em></h2>
<p>This document is referred to by the <a title="API specification" href="/blog/2010/03/business-sms/rest-sms-api-specification-document/">REST SMS Gateway API &#8211; Specification Document</a>.</p>
<p><em><span style="font-style: normal;"><span style="font-weight: normal;">Resource URI:</span></span></em></p>
<pre>http://www.textmarketer.biz/services/rest/deliveryReport</pre>
<p>Actions on a specific delivery report.</p>
<ul>
<li><a title="get method" href="#get">GET method</a> - Gets the contents of a delivery report</li>
</ul>
<p>An individual delivery report shows the current known status of all messages sent on a given day, or for a particular campaign. Whereas the REST API resource <em><a title="deliveryReports resource" href="/blog/2010/06/business-sms/rest-sms-gateway-api-deliveryreports-resource/" target="_self">deliveryReport</a><strong><a title="deliveryReports resource" href="#deliveryReports_resource" target="_self">s</a> </strong></em>(note the trailing s) gets a list of available delivery report names, including delivery reports for campaigns (see <a title="deliveryReports resource" href="/blog/2010/06/business-sms/rest-sms-gateway-api-deliveryreports-resource/" target="_self">here</a>).</p>
<p style="color:white">GET</p>
<p><a id="get"></a><strong><em>GET method</em></strong></p>
<p>Gets the contents of a delivery report &#8211; the status of delivery of sent messages on a given day or for a given campaign.</p>
<p style="padding-left: 30px;">It is important to understand the difference between the status of a message in a delivery report, and getting a success or failure when using the API to <a title="sms resource" href="/blog/2010/03/business-sms/rest-sms-api-specification-document/#sms_resource" target="_self">send</a> a message.</p>
<p style="padding-left: 30px;">A &#8216;success&#8217; response from the SMS <a title="sms resource" href="/blog/2010/03/business-sms/rest-sms-api-specification-document/#sms_resource" target="_self">send</a> only confirms that the number and message appear to be in the correct format &#8211; this does not mean that the number actually exists, or that the message was received by the recipient.</p>
<p style="padding-left: 30px;">Whereas a delivery report &#8211; which you retrieve through this &#8216;deliveryReport&#8217; resource &#8211; confirms to you what has actually happened to the sent message. This may change over time, i.e. a delivery report may not show a status for a given message 10 minutes after the message was sent, but may show a status after an hour. The status of messages can change up to 24 hours after the message was sent. Therefore you may prefer to wait for 24 hours after sending an SMS before trying to retrieve its delivery report.</p>
<p style="padding-left: 30px;">The possible outcomes for a sent message in a delivery report are: DELIVERED,REJECTED,FAILED, &#8220;NON-UK&#8221;  or no report at all.</p>
<ul style="padding-left: 60px;">
<li>REJECTED means that the relevant operator rejected the message and did not attempt to deliver it.</li>
<li>FAILED probably means that the number does exist (or at least not anymore).</li>
<li>DELIVERED means the message was received on the handset.</li>
<li>&#8220;NON-UK&#8221; you are on a UK only route and have tried to send a non UK number.</li>
</ul>
<p style="padding-left: 30px;">Occasionally there is no delivery report status for a given message at all. This can be due to a failure at the operator end because of exceptionally high load or other problems.</p>
<p><strong>Example usage</strong></p>
<pre>http://www.textmarketer.biz/services/rest/deliveryReport/test-190310</pre>
<p>will get the contents of the delivery report named &#8216;test-190310&#8242;. This is the delivery report for the campaign you would have sent named &#8216;test&#8217;.</p>
<p><a title="resource ID" href="/blog/2010/03/business-sms/rest-sms-api-specification-document/#resource_identifier">RESOURCE_ID</a>: the name of the delivery report to retrieve</p>
<p><strong>Example GET response</strong></p>
<pre>&lt;response processed_date="2010-03-19T15:24:30+00:00"&gt;
	&lt;report name="test-190310" last_updated="2010-03-19T09:45:04+00:00" extension="csv"&gt;
		&lt;reportrow modified_date="2010-03-19T09:45:00+00:00" mobile_number="447123123456" message_id="12345678"
 status="DELIVERED"/&gt;
		&lt;reportrow modified_date="2010-03-19T09:45:00+00:00" mobile_number="447123123456" message_id="12345679"
 status="DELIVERED"/&gt;
	&lt;/report&gt;
&lt;/response&gt;</pre>
<p>The XML response contains individual reportrow&#8217;s that give the delivery status of an individual message.</p>
<ul>
<li>&#8216;message_id&#8217; is a unique ID for the message that was sent</li>
<li>&#8216;modified_date&#8217; is the last date the delivery status for that message ID was updated</li>
<li>&#8216;mobile_number&#8217; is the number the SMS was sent to</li>
</ul>
<p><a title="REST SMS API DTD specification and  documentation" href="http://www.textmarketer.biz/services/rest/DTD/" target="_self">Read the advanced specification of this response</a>.</p>
<p><strong>Specific error codes</strong></p>
<p><strong></strong>N/A</p>
<p><strong>Note</strong></p>
<p>When we receive a status report from the operator this gets added to a delivery report with a standardised name. The naming format is as follows:</p>
<p>GatewayAPI_DD-MM-YY where DD is the day in the month, MM is the month and YY is the year, each being in a 2-digit format.</p>
<p>So for example:</p>
<pre>GatewayAPI_04-01-09     is valid</pre>
<pre>GatewapAPI_12-12-09     is valid</pre>
<pre>GatewayAPI_1-1-9        is invalid</pre>
<p>Thus to get the delivery report for messages sent on 12th January 2010, you would use the URI:</p>
<pre>http://www.textmarketer.biz/services/rest/deliveryReport/GatewayAPI_12-01-10</pre>
<p><strong>Example PHP</strong></p>
<pre>&lt;?php
/**
 * GET request on the deliveryReport resource
 */
// TODO the URL will change according to the delivery report to retrieve...
$url = 'http://www.textmarketer.biz/services/rest/deliveryReport/myreportname'; // CHANGE THIS!!!
$username = 'myAPIusername'; // CHANGE THIS!!!
$password = 'myAPIpassword'; // CHANGE THIS!!!
$url = "$url?username=$username&amp;password=$password";

// we're using the curl library to make the request
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, true);
$responseBody = curl_exec($curlHandle);
$responseInfo  = curl_getinfo($curlHandle);
curl_close($curlHandle);

// deal with the response
if ($responseInfo['http_code']==200)
{
	$xml_obj = simplexml_load_string($responseBody);

	$reportRows = array();
	foreach ($xml_obj-&gt;report-&gt;reportrow as $xml_reportRow)
	{
		$atts = $xml_reportRow-&gt;attributes();
		$mobile = (string) $atts-&gt;mobile_number;
		$updated = (string) $atts-&gt;last_updated;
		$msgID = (int) $atts-&gt;message_id;
		$status = (string) $atts-&gt;status;
		$reports[] = array('mobile'=&gt;$mobile, 'modified'=&gt;$updated, 'messageID'=&gt;$msgID, 'status'=&gt;$status);
	}
	// do something with the report details
	var_dump($reports);

} else {
	// handle the error
	var_dump($responseBody);
}

?&gt;</pre>
<img src="http://www.textmarketer.co.uk/wordpress/?ak_action=api_record_view&id=1535&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.textmarketer.co.uk/blog/2010/06/sms-gateway/rest-sms-gateway-api-deliveryreport-resource/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>REST SMS Gateway API &#8211; deliveryReports resource</title>
		<link>http://www.textmarketer.co.uk/blog/2010/06/sms-gateway/rest-sms-gateway-api-deliveryreports-resource/</link>
		<comments>http://www.textmarketer.co.uk/blog/2010/06/sms-gateway/rest-sms-gateway-api-deliveryreports-resource/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 13:28:16 +0000</pubDate>
		<dc:creator>Jay</dc:creator>
				<category><![CDATA[All SMS Gateway Documentation]]></category>
		<category><![CDATA[Business SMS]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://87.106.109.73/blog/?p=1530</guid>
		<description><![CDATA[This blog post has been superseded with our website documentation deliveryReports This document is referred to by the REST SMS Gateway API &#8211; Specification Document. Resource URI: http://www.textmarketer.biz/services/rest/deliveryReports Actions on the list of available delivery reports. GET method - Gets a list of available delivery report names The REST API resource deliveryReports (note the trailing &#8216;s&#8217;) &#8230; <a href="http://www.textmarketer.co.uk/blog/2010/06/sms-gateway/rest-sms-gateway-api-deliveryreports-resource/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.textmarketer.co.uk/developers/restful-api.htm">This blog post has been superseded with our website documentation</a></p>
<h2>deliveryReports</h2>
<p>This document is referred to by the <a title="API specification" href="/blog/2010/03/business-sms/rest-sms-api-specification-document/">REST SMS Gateway API &#8211; Specification Document</a>.</p>
<p><em><strong><span style="font-style: normal;"><span style="font-weight: normal;">Resource URI:</span></span></strong></em></p>
<pre>http://www.textmarketer.biz/services/rest/deliveryReports</pre>
<p>Actions on the list of available delivery reports.</p>
<ul>
<li><a title="get method" href="#get">GET method</a> - Gets a list of available delivery report names</li>
</ul>
<p>The REST API resource <em>deliveryReport<strong>s </strong></em>(note the trailing &#8216;s&#8217;) performs actions on the list of available delivery report names, including delivery reports for campaigns.</p>
<p>A delivery report shows the current known status of all messages sent on a given day or for a particular campaign. To access the contents of a particular delivery report &#8211; which will contain the status of individual messages &#8211; you would use the <a title="deliveryReport resource" href="/blog/2010/06/sms-gateway/rest-sms-gateway-api-deliveryreport-resource/" target="_self">deliveryReport</a> resource instead - i.e. no trailing &#8216;s&#8217;.</p>
<p style="color:white">GET</p>
<p><a id="get"></a><em><strong>GET method</strong></em></p>
<p>Get the list of available delivery reports.</p>
<p><strong>Example usage</strong></p>
<pre>http://www.textmarketer.biz/services/rest/deliveryReports</pre>
<p><strong>Example GET response</strong></p>
<pre>&lt;response processed_date="2010-03-19T15:20:49+00:00"&gt;
	&lt;userdirectory&gt;aBcDeFgHiJkLmNoPqRsTuVwZ&lt;/userdirectory&gt;
	&lt;reports quantity="2" &gt;
		&lt;report name="test-190310" last_updated="2010-03-19T09:45:04+00:00" extension="csv"/&gt;
		&lt;report name="GatewayAPI_08-03-10" last_updated="2010-03-08T15:45:02+00:00" extension="csv"/&gt;
	&lt;/reports&gt;
&lt;/response&gt;</pre>
<p><a title="REST SMS API DTD specification and  documentation" href="http://www.textmarketer.biz/services/rest/DTD/" target="_self">Read the advanced specification of this response</a>.</p>
<p>When we receive a delivery report from the operator this gets added to a delivery report with a standardised name. The naming format is as follows: GatewayAPI_DD-MM-YY where DD is the day in the month, MM is the month and YY is the year, each being in a 2-digit format. So for example:</p>
<pre>GatewayAPI_04-01-09     is valid</pre>
<pre>GatewapAPI_12-12-09     is valid</pre>
<pre>GatewayAPI_1-1-9        is invalid</pre>
<p><strong>Specific error codes</strong></p>
<p>N/A</p>
<p><strong>Note</strong></p>
<p>Although it is expected that you will want to use the <em>deliveryReport</em> resource to get the contents of a delivery report, the response as shown above contains all the information necessary to download the delivery reports in csv format, if that is your preferred method. In this case each report can be accessed via the URL</p>
<pre>http://www.textmarketer.biz/DeliveryReports/[dir]/[filename]</pre>
<p>where</p>
<pre>[dir] = the user directory as found in the response above, i.e. in the above example aBcDeFgHiJkLmNoPqRsTuVwZ
[filename] = the name of the csv file to download, e.g. GatewayAPI_08-03-10.csv</pre>
<p>So the complete URL in this example would be:</p>
<pre>http://www.textmarketer.biz/DeliveryReports/aBcDeFgHiJkLmNoPqRsTuVwZ/GatewayAPI_08-03-10.csv</pre>
<p><strong>Example PHP code</strong></p>
<pre>&lt;?php
/**
 * GET request on the deliveryReports resource
 */
$url = 'http://www.textmarketer.biz/services/rest/deliveryReports';
$username = 'myAPIusername'; // CHANGE THIS!!!
$password = 'myAPIpassword'; // CHANGE THIS!!!
$url = "$url?username=$username&amp;password=$password";

// we're using the curl library to make the request
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, true);
$responseBody = curl_exec($curlHandle);
$responseInfo  = curl_getinfo($curlHandle);
curl_close($curlHandle);

// deal with the response
if ($responseInfo['http_code']==200)
{
	$xml_obj = simplexml_load_string($responseBody);
	$atts = $xml_obj-&gt;reports-&gt;attributes();
	$num_reports = (int) $atts-&gt;quantity;

	if ($num_reports &gt; 0)
	{
		echo "$num_reports reports\n";
		$reports = array();
		foreach ($xml_obj-&gt;reports-&gt;report as $xml_report)
		{
			$atts = $xml_report-&gt;attributes();
			$name = (string) $atts-&gt;name;
			$updated = (string) $atts-&gt;last_updated;
			$reports[] = array('name'=&gt;$name, 'modified'=&gt;$updated);
		}
		// do something with the report details
		var_dump($reports);
	} else {
		echo 'No reports available';
	}
} else {
	// handle the error
	var_dump($responseBody);
}
?&gt;</pre>
<img src="http://www.textmarketer.co.uk/wordpress/?ak_action=api_record_view&id=1530&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.textmarketer.co.uk/blog/2010/06/sms-gateway/rest-sms-gateway-api-deliveryreports-resource/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>REST SMS Gateway API &#8211; credits resource</title>
		<link>http://www.textmarketer.co.uk/blog/2010/06/sms-gateway/rest-sms-gateway-api-credits-resource/</link>
		<comments>http://www.textmarketer.co.uk/blog/2010/06/sms-gateway/rest-sms-gateway-api-credits-resource/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 13:19:38 +0000</pubDate>
		<dc:creator>Jay</dc:creator>
				<category><![CDATA[All SMS Gateway Documentation]]></category>
		<category><![CDATA[Business SMS]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://87.106.109.73/blog/?p=1525</guid>
		<description><![CDATA[This blog post has been superseded with our website documentation credits This document is referred to by the REST SMS Gateway API &#8211; Specification Document. Resource URI: http://www.textmarketer.biz/services/rest/credits Actions on the account credits. GET method - get the number of credits currently available on your account POST method - transfer credits between accounts GET &#8230; <a href="http://www.textmarketer.co.uk/blog/2010/06/sms-gateway/rest-sms-gateway-api-credits-resource/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.textmarketer.co.uk/developers/restful-api.htm">This blog post has been superseded with our website documentation</a></p>
<h2><em><strong>credits</strong></em></h2>
<p>This document is referred to by the <a title="API specification" href="/blog/2010/03/business-sms/rest-sms-api-specification-document/">REST SMS Gateway API &#8211; Specification Document</a>.</p>
<p>Resource URI:</p>
<pre>http://www.textmarketer.biz/services/rest/credits</pre>
<p>Actions on the account credits.</p>
<ul>
<li><a title="get" href="#get">GET method</a> <em>- </em>get the number of credits currently available on your account</li>
<li><a title="post" href="#post">POST method</a> - transfer credits between accounts</li>
</ul>
<p style="color:white">GET</p>
<p><a id="get"></a><em><strong>GET method</strong></em></p>
<p>Get the number of credits currently available on your account.</p>
<p><strong>Example usage</strong></p>
<pre>http://www.textmarketer.biz/services/rest/credits</pre>
<p><strong>Example GET response</strong></p>
<pre>&lt;<span class="start-tag">response</span><span class="attribute-name"> processed_date</span>=<span class="attribute-value">"2010-03-19T15:19:33+00:00"</span>&gt;
&lt;<span class="start-tag">credits</span>&gt;37&lt;/<span class="end-tag">credits</span>&gt;
&lt;/<span class="end-tag">response</span>&gt;</pre>
<p><a title="REST SMS API DTD specification and documentation" href="http://www.textmarketer.biz/services/rest/DTD/" target="_self">Read the advanced specification of this response</a>.</p>
<p><strong>Specific error codes</strong></p>
<p>N/A</p>
<p><strong>Example PHP code</strong></p>
<pre>&lt;?php
/**
 * GET request on the 'credits' resource
 */
$url = 'http://www.textmarketer.biz/services/rest/credits';
$username = 'myAPIusername'; // CHANGE THIS!!!
$password = 'myAPIpassword'; // CHANGE THIS!!!
$url = "$url?username=$username&amp;password=$password";

// we're using the curl library to make the request
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, true);
$responseBody = curl_exec($curlHandle);
$responseInfo  = curl_getinfo($curlHandle);
curl_close($curlHandle);

// deal with the response
if ($responseInfo['http_code']==200)
{
	$xml_obj = simplexml_load_string($responseBody);
	$credits = (int) $xml_obj-&gt;credits;
	// do something with the result
	echo $credits;

} else {
	// handle the error
	var_dump($responseBody);
}

?&gt;</pre>
<p style="color:white">P</p>
<p><a id="post"></a><em><strong>POST method</strong></em></p>
<p>Transfer credits from the source/master account to the target/sub account.</p>
<p><strong>Example usage</strong></p>
<pre>http://www.textmarketer.biz/services/rest/credits</pre>
<p><strong>Post arguments</strong></p>
<table border="0">
<tbody>
<tr valign="top">
<td width="100px"><strong>parameter</strong></td>
<td><strong>usage</strong></td>
</tr>
<tr valign="top">
<td>quantity</td>
<td>the number of credits to transfer from the source account to the target account. Must be a positive integer.</td>
</tr>
<tr valign="top">
<td>target</td>
<td>the account number of the account to transfer the credits to (this can be found in the Settings &gt; Account Settings page in the Web interface)</td>
</tr>
<tr valign="top">
<td>username</td>
<td>(optional) required if not using HTTP Digest authentication &#8211; this is the username of the source/master account</td>
</tr>
<tr valign="top">
<td>password</td>
<td>(optional) required if not using HTTP Digest authentication &#8211; this is the password of the source/master account</td>
</tr>
</tbody>
</table>
<p style="color:white">or</p>
<p>OR you can specify the target account user name and password, rather than the target account number</p>
<table border="0">
<tbody>
<tr valign="top">
<td width="100px"><strong>parameter</strong></td>
<td><strong>usage</strong></td>
</tr>
<tr valign="top">
<td>quantity</td>
<td>the number of credits to transfer from the source account to the target account. Must be a positive integer.</td>
</tr>
<tr valign="top">
<td>target_username</td>
<td>this is the username of the target/sub account to transfer credits TO</td>
</tr>
<tr valign="top">
<td>target_password</td>
<td>this is the password of the target/sub account to transfer credits TO</td>
</tr>
<tr valign="top">
<td>username</td>
<td>(optional) required if not using HTTP Digest authentication &#8211; this is the username of the source/master account to transfer credits FROM</td>
</tr>
<tr valign="top">
<td>password</td>
<td>(optional) required if not using HTTP Digest authentication &#8211; this is the password of the source/master account to transfer credits FROM</td>
</tr>
</tbody>
</table>
<p style="color:white">Example POST</p>
<p><strong>Example POST response</strong></p>
<pre>&lt;response processed_date="2010-03-23T10:31:39+00:00"&gt;
	&lt;source_credits_before&gt;1000&lt;/source_credits_before&gt;
	&lt;source_credits_after&gt;900&lt;/source_credits_after&gt;
	&lt;target_credits_before&gt;0&lt;/target_credits_before&gt;
	&lt;target_credits_after&gt;100&lt;/target_credits_after&gt;
&lt;/response&gt;</pre>
<p><a title="REST SMS API DTD specification and documentation" href="http://www.textmarketer.biz/services/rest/DTD/" target="_self">Read the advanced specification of this response</a>.</p>
<p><strong>Specific error codes</strong></p>
<table border="0">
<tbody>
<tr valign="top">
<td width="100px"><strong>Code</strong></td>
<td><strong>Meaning</strong></td>
</tr>
<tr valign="top">
<td>0</td>
<td>there are insufficient credits available to transfer the specified quantity, or the specified quantity is not a positive number</td>
</tr>
<tr valign="top">
<td>1</td>
<td>the target account number specified is not a valid number or username/password combination does not refer to any known account</td>
</tr>
</tbody>
</table>
<p style="color:white">Example XML</p>
<p><strong>Example XML error response</strong></p>
<pre><span><span style="color: #cc0000;"><span style="color: #000000;">&lt;response processed_date="2010-03-24T14:37:41+00:00"&gt;
&lt;errors&gt;
	&lt;error code="0"&gt;Invalid number of credits specified: -1&lt;/error&gt;
	&lt;error code="1"&gt;Invalid destination account number&lt;/error&gt;
&lt;/errors&gt;
&lt;/response&gt;</span></span></span></pre>
<p><strong>Example PHP code</strong></p>
<pre>&lt;?php
/**
 * POST request on the 'credits' resource (credit transfer)
 */
$url = 'http://www.textmarketer.biz/services/rest/credits';
// uncomment for testing:
//$url = 'http://sandbox.textmarketer.biz/services/rest/credits';
$username = 'myAPIusername'; // CHANGE THIS!!! - the username of the account you're transferring FROM
$password = 'myAPIpassword'; // CHANGE THIS!!!
$targetAccountNumber = 0; // CHANGE THIS!!

$data = array('quantity'=&gt;'1',
	'target'=&gt;$targetAccountNumber,
	// or you could use the target username/password instead of 'target'
	// 'target_username'=&gt;$targetUserName, 'target_password'=&gt;$targetPassword,
	'username'=&gt;$username, 'password'=&gt;$password);
$data = http_build_query($data, '', '&amp;');
// we're using the curl library to make the request
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curlHandle, CURLOPT_POSTFIELDS, $data);
curl_setopt($curlHandle, CURLOPT_POST, 1);
$responseBody = curl_exec($curlHandle);
$responseInfo  = curl_getinfo($curlHandle);
curl_close($curlHandle);

// deal with the response
if ($responseInfo['http_code']==200)
{
	$xml_obj = simplexml_load_string($responseBody);
	// do something with the result
	echo "Source account credits before: $xml_obj-&gt;source_credits_before\n";
	echo "Source account credits after: $xml_obj-&gt;source_credits_after\n";
	echo "Target account credits before: $xml_obj-&gt;target_credits_before\n";
	echo "Target account credits after: $xml_obj-&gt;target_credits_after\n";
} else {
	// handle the error here
	var_dump($responseInfo);
	var_dump($responseBody);
}
?&gt;</pre>
<img src="http://www.textmarketer.co.uk/wordpress/?ak_action=api_record_view&id=1525&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.textmarketer.co.uk/blog/2010/06/sms-gateway/rest-sms-gateway-api-credits-resource/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RESTful Web Services SMS Gateway API Overview</title>
		<link>http://www.textmarketer.co.uk/blog/2010/03/sms-gateway/restful-web-services-sms-api-overview/</link>
		<comments>http://www.textmarketer.co.uk/blog/2010/03/sms-gateway/restful-web-services-sms-api-overview/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 10:57:26 +0000</pubDate>
		<dc:creator>Jay</dc:creator>
				<category><![CDATA[All SMS Gateway Documentation]]></category>
		<category><![CDATA[Business SMS]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Web to SMS]]></category>
		<category><![CDATA[gateway]]></category>
		<category><![CDATA[integrate]]></category>
		<category><![CDATA[RESTful]]></category>
		<category><![CDATA[sms]]></category>
		<category><![CDATA[sms api]]></category>
		<category><![CDATA[web service]]></category>

		<guid isPermaLink="false">http://87.106.109.73/blog/?p=1107</guid>
		<description><![CDATA[This blog post has been superseded with our website documentation In addition to our simple HTTP SMS Gateway API, explained here, we also provide a &#8216;RESTful&#8217; SMS API to give you access to information about your SMS marketing account (don&#8217;t have one? Create a free account). If you are familiar with REST APIs, &#8230; <a href="http://www.textmarketer.co.uk/blog/2010/03/sms-gateway/restful-web-services-sms-api-overview/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.textmarketer.co.uk/developers/restful-api.htm">This blog post has been superseded with our website documentation</a></p>
<p>In addition to our simple HTTP <a title="SMS Gateway API" href="/blog/2009/05/sms-gateway/text-marketer-apigateway-spec/">SMS Gateway API</a>, explained <a title="SMS Gateway API" href="/blog/2009/05/sms-gateway/text-marketer-apigateway-spec/">here</a>, we also provide a &#8216;RESTful&#8217; SMS API to give you access to information about your <a title="Get an SMS account" href="http://www.textmarketer.co.uk/signUpGoogle/" target="_self">SMS marketing account</a> (don&#8217;t have one? Create a <a title="Free SMS account" href="http://www.textmarketer.co.uk/signUpGoogle/">free account</a>).</p>
<p>If you are familiar with REST APIs, you may wish to jump to our <a title="REST SMS API specification" href="/blog/2010/03/business-sms/rest-sms-api-specification-document/" target="_self">REST API specification document</a>.</p>
<p><strong>WHAT&#8217;S A &#8216;RESTful&#8217; SMS API?</strong></p>
<p>REST is a term used to describe a type of two-way communication via the Internet. It is an architectural style, not a standard, but makes use of well-known web technologies such as <a title="HTTP Protocol" href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol" target="_blank">HTTP</a>, <a title="XML Language" href="http://en.wikipedia.org/wiki/Xml" target="_blank">XML</a> and <a title="MIME types" href="http://en.wikipedia.org/wiki/Mime_types" target="_blank">MIME types</a>. For more information about REST APIs, read <a title="REST Web Services" href="http://www.xfront.com/REST-Web-Services.html" target="_blank">this great description of REST</a>.</p>
<p>At its most simple, our <a title="RESTful Web Services" href="http://http://www.xfront.com/REST-Web-Services.html" target="_blank">RESTful</a> SMS API allows you to request (&#8216;GET&#8217;) information. For example, from this &#8216;resource&#8217;</p>
<p><a title="REST SMS API resource example" href="http://www.textmarketer.biz/services/rest/credits" target="_blank"><em></em></a><em><a title="Credits resource" href="http://www.textmarketer.biz/services/rest/credits" target="_blank">http://www.textmarketer.biz/services/rest/credits</a> </em></p>
<p>you can access the number of credits available in your account. The response is an XML document that looks like this:</p>
<pre>&lt;<span class="start-tag">response</span><span class="attribute-name"> processed_date</span>=<span class="attribute-value">"2010-03-19T09:37:26+00:00"</span>&gt;
&lt;<span class="start-tag">credits</span>&gt;37&lt;/<span class="end-tag">credits</span>&gt;
&lt;/<span class="end-tag">response</span>&gt;</pre>
<p>The SMS REST API is that simple!</p>
<p><strong>WHAT ABOUT SECURITY?</strong></p>
<p>Although it&#8217;s not apparent from the example above, the interface does require authentication using your SMS API account username/password. We provide two ways of passing this information to the server.</p>
<p>The first is via <a title="HTTP Basic Auth" href="http://en.wikipedia.org/wiki/Basic_access_authentication" target="_blank">HTTP Basic Authentication</a>, which is demonstrated by the login box that appears if you click on the resource link above. HTTP Basic authentication can of course be handled within your code. However if you prefer a simpler method, you can pass the parameters via the URL as GET arguments, e.g.</p>
<p><em><a>http://www.textmarketer.biz/services/rest/credits?username=myusername&amp;password=mypassword</a></em></p>
<p>It is also recommended that you use encrypted communication with the REST Web Services by accessing resources via the HTTPS protocol (<em><a>https://&#8230; etc.)</a></em>.</p>
<p><strong>HOW DOES THE RESTful API HANDLE ERRORS?</strong></p>
<p>An advantage of using a RESTful API is that the underlying technologies already do a lot of the work for us. All responses via the HTTP protocol include headers that give us some information about the response. The headers in the above example would look like this:</p>
<pre>Date: Fri, 19 Mar 2010 10:11:40 GMT
Server: Apache/2.2.3 (Red Hat)
X-Powered-By: PHP/5.2.11 ZendServer/4.0
Content-Length: 272
Connection: close
Content-Type: application/xml

200 OK</pre>
<p>The MIME type (Content-Type) is set to application/xml which identifies the type of content in the response. It is followed by the response status code &#8217;200&#8242; and the status message &#8216;OK&#8217;. This is a standard response to a successful request.</p>
<p>If we had tried to access a resource which didn&#8217;t exist, e.g.</p>
<p><a title="Bad request" href="http://www.textmarketer.biz/services/rest/anotherResource" target="_blank">http://www.textmarketer.biz/services/rest/anotherResource</a></p>
<p>we would get the following response headers:</p>
<pre>Date: Fri, 19 Mar 2010 10:18:23 GMT
Server: Apache/2.2.3 (Red Hat)
X-Powered-By: PHP/5.2.11 ZendServer/4.0
Content-Length: 549
Connection: close
Content-Type: application/xml

404 Not Found :  (ERR101)</pre>
<p>The status code is 404, which is the HTTP protocol&#8217;s standard code for &#8216;resource not found&#8217;. The status message also contains some additional debugging information (ERR91) which you can ignore.</p>
<p>In addition to the status code, the response body contains XML detailing the error. In this example it might look like this:</p>
<pre>&lt;<span class="start-tag">response</span><span class="attribute-name"> processed_date</span>=<span class="attribute-value">"2010-03-24T14:45:54+00:00"</span>&gt;
&lt;<span class="start-tag">errors</span>&gt;
	&lt;<span class="start-tag">error</span><span class="attribute-name"> code</span>=<span class="attribute-value">"404"</span>&gt;Not Found :  (ERR101)&lt;/<span class="end-tag">error</span>&gt;
&lt;/<span class="end-tag">errors</span>&gt;
&lt;/<span class="end-tag">response</span>&gt;</pre>
<p>Thus, you can check the header status code for an error code, as well  as the response body.</p>
<p><strong>WHAT RESOURCES CAN I ACCESS THROUGH THE REST SMS API?</strong></p>
<p>At the moment, the resource URIs available to you are:</p>
<ul>
<li><a title="Credits resource" href="/blog/2010/03/business-sms/rest-sms-api-specification-document/#credits_resource"><em>http://www.textmarketer.biz/services/rest/credits</em></a> &#8211; to get the credits available on your account / transfer credits between accounts</li>
<li><a title="deliveryReports resource" href="/blog/2010/03/business-sms/rest-sms-api-specification-document/#deliveryReports_resource"><em>http://www.textmarketer.biz/services/rest/deliveryReports</em></a> &#8211; to list your delivery reports</li>
<li><a title="deliveryReport resource" href="/blog/2010/03/business-sms/rest-sms-api-specification-document/#deliveryReport_resource"><em>http://www.textmarketer.biz/services/rest/deliveryReport/</em>a_report_name</a> &#8211; to access the details of a specific report</li>
<li><a title="sms resource" href="/blog/2010/03/business-sms/rest-sms-api-specification-document/#sms_resource"><em>http://www.textmarketer.biz/services/rest/sms</em></a> &#8211; to send an SMS</li>
<li><em><a title="keywords resource" href="/blog/2010/03/business-sms/rest-sms-api-specification-document/#keywords_resource">http://www.textmarketer.biz/services/rest/keywords</a></em> &#8211; to get the availability of a given keyword (see <a href="http://www.textmarketer.co.uk/shortcode_sms.htm" target="_blank">Short Code SMS Service</a>)</li>
</ul>
<p>More will be added in the future.</p>
<p>Here are 2 walk-through examples for using the REST SMS API.</p>
<p><strong>EXAMPLE REQUEST 1 &#8211; GET CREDITS</strong></p>
<p>Make an HTTP GET request like this:</p>
<p><em></em><em><a>http://www.textmarketer.biz/services/rest/credits?username=myAPIusername&amp;password=myAPIpassword</a></em></p>
<p>Obviously, replace &#8216;myAPIusername&#8217; and &#8216;myAPIpassword&#8217; in the URL with the ones you received when you <a title="Sign up for free SMS account" href="http://www.textmarketer.co.uk/signUpGoogle/" target="_blank">signed up</a>.</p>
<p>When you send this request using your favorite programming language, you should receive the following HTTP <em>headers</em> in response:</p>
<pre>Date: Wed, 24 Mar 2010 15:17:28 GMT
Server: Apache/2.2.3 (Red Hat)
X-Powered-By: PHP/5.2.11 ZendServer/4.0
Content-Length: 272
Connection: close
Content-Type: application/xml

200 OK</pre>
<p>Using your programming language, you can easily extract the status code (200 in this case), which indicates success (200) or failure (not 200). The status code of 200 here shows us the request was successful, i.e. the response contains the number of credits in your account.</p>
<p>Thus the HTTP response <em>body</em> that you receive will contain XML similar to this:</p>
<pre>&lt;<span class="start-tag">response</span><span class="attribute-name"> processed_date</span>=<span class="attribute-value">"2010-03-24T15:17:28+00:00"</span>&gt;
&lt;<span class="start-tag">credits</span>&gt;10&lt;/<span class="end-tag">credits</span>&gt;
&lt;/<span class="end-tag">response</span>&gt;</pre>
<p>In your programming language you can parse the XML to extract the value of the credits, in this case 10.</p>
<p>But if, for example, you use an incorrect password, the response headers will look like this:</p>
<pre>Date: Wed, 24 Mar 2010 15:30:10 GMT
Server: Apache/2.2.3 (Red Hat)
X-Powered-By: PHP/5.2.11 ZendServer/4.0
Content-Length: 377
Connection: close
Content-Type: application/xml

403 Forbidden : Your username/password combination did not match an account. (ERR145)</pre>
<p>The 403 status code shows that an error occurred (all codes except 200 indicate an error). And the XML response body will also contain:</p>
<pre>&lt;<span class="start-tag">response</span><span class="attribute-name"> processed_date</span>=<span class="attribute-value">"2010-03-24T15:29:22+00:00"</span>&gt;
&lt;<span class="start-tag">errors</span>&gt;
	&lt;<span class="start-tag">error</span><span class="attribute-name"> code</span>=<span class="attribute-value">"403"</span>&gt;Forbidden : Your username/password combination did not match an account. (ERR145)&lt;/<span class="end-tag">error</span>&gt;
&lt;/<span class="end-tag">errors</span>&gt;
&lt;/<span class="end-tag">response</span>&gt;</pre>
<p><strong>EXAMPLE REQUEST 2 &#8211; SEND SMS</strong></p>
<p>In your programming language, create an HTTP <em>POST</em> request to this URL:</p>
<p><em>http://www.textmarketer.biz/services/rest/sms</em></p>
<p>Since this is a POST request, you cannot pass the username and password via the URL, so you need to use HTTP Digest Authentication, or simply include these parameters along with the other POST parameters you&#8217;ll need:</p>
<ul>
<li>message=&#8217;my message&#8217;</li>
<li>originator=&#8217;me&#8217;</li>
<li>mobile_number=&#8217;447777777777&#8242;</li>
<li>username=&#8217;myAPIusername&#8217; (replace with your own &#8211; or skip this parameter and use HTTP Digest Authentication)</li>
<li>password=&#8217;myAPIpassword&#8217; (replace with your own &#8211; or skip this parameter and use HTTP Digest Authentication)</li>
</ul>
<p>POSTing an HTTP request using the above as POST parameters would send an SMS message of &#8216;my message&#8217; to the mobile number 447777777777 from &#8220;me&#8221;.</p>
<p>NOTE: It will not work to pass these parameters as GET arguments (e.g. by appending them to the URL); this is the principle of a REST API.</p>
<p>Your HTTP POST request should return something similar to the following response headers:</p>
<pre>Date: Wed, 24 Mar 2010 15:17:28 GMT
Server: Apache/2.2.3 (Red Hat)
X-Powered-By: PHP/5.2.11 ZendServer/4.0
Content-Length: 272
Connection: close
Content-Type: application/xml

200 OK</pre>
<p>&#8230;the &#8217;200&#8242; status code showing that your request was successful. The HTTP response body will consist of XML containing the ID of the SMS sent as well as the number of credits used to send it:</p>
<pre>&lt;response processed_date="2010-03-23T10:31:39+00:00"&gt;
	&lt;message_id&gt;4172870907&lt;/message_id&gt;
	&lt;credits_used&gt;1&lt;/credits_used&gt;
&lt;/response&gt;</pre>
<p>If, however, there was a problem with your request parameters, for example you set mobile_number to &#8216;garbage&#8217;, you would get similar response headers to this:</p>
<pre>Date: Wed, 24 Mar 2010 15:30:10 GMT
Server: Apache/2.2.3 (Red Hat)
X-Powered-By: PHP/5.2.11 ZendServer/4.0
Content-Length: 377
Connection: close
Content-Type: application/xml

404 Bad request</pre>
<p>And the response body would contain XML detailing the precise problems with your request, like this:</p>
<pre><span><span style="color: #cc0000;"><span style="color: #000000;">&lt;response processed_date="2010-03-24T14:37:41+00:00"&gt;
&lt;errors&gt;
	&lt;error code="10"&gt;invalid number or not an integer&lt;/error&gt;
	&lt;error code="9"&gt;invalid number or too short&lt;/error&gt;
&lt;/errors&gt;
&lt;/response&gt;
</span></span></span></pre>
<p>See the <a title="sms resource" href="http://www.textmarketer.co.uk/blog/2010/03/business-sms/rest-sms-api-specification-document/#sms_resource">specification of the sms resource</a> for more details of the possible error codes.</p>
<p><strong>TESTING/SANDBOX</strong></p>
<p>A <a title="Sandbox API" href="/blog/2010/03/business-sms/rest-sms-api-specification-document/#sandbox">sandbox service</a> is available for testing your code without changing your account or using any credits.</p>
<p><strong>MORE INFORMATION</strong></p>
<p>For detailed information about our RESTful SMS API, please see our <a title="REST SMS API specification" href="/blog/2010/03/business-sms/rest-sms-api-specification-document/" target="_self">REST  API specification document</a>.</p>
<p>For reference, a list of the DTDs that correspond to the  resources available can be <a title="Web Services DTDs" href="http://www.textmarketer.biz/services/rest/DTD/" target="_blank">found here</a>.</p>
<img src="http://www.textmarketer.co.uk/wordpress/?ak_action=api_record_view&id=1107&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.textmarketer.co.uk/blog/2010/03/sms-gateway/restful-web-services-sms-api-overview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>REST SMS Gateway API &#8211; Specification Document</title>
		<link>http://www.textmarketer.co.uk/blog/2010/03/business-sms/rest-sms-api-specification-document/</link>
		<comments>http://www.textmarketer.co.uk/blog/2010/03/business-sms/rest-sms-api-specification-document/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 10:57:16 +0000</pubDate>
		<dc:creator>Jay</dc:creator>
				<category><![CDATA[Business SMS]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[All SMS Gateway Documentation]]></category>
		<category><![CDATA[RESTful]]></category>
		<category><![CDATA[sms api]]></category>
		<category><![CDATA[specification]]></category>

		<guid isPermaLink="false">http://87.106.109.73/blog/?p=1134</guid>
		<description><![CDATA[This blog post has been superseded with our website documentation For an overview of what REST and our RESTful SMS API is all about you may like to read our RESTful SMS API Overview. If you prefer you can use the simple SMS gateway, rather than our RESTful implementation. To get straight into the details, &#8230; <a href="http://www.textmarketer.co.uk/blog/2010/03/business-sms/rest-sms-api-specification-document/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.textmarketer.co.uk/developers/restful-api.htm">This blog post has been superseded with our website documentation</a></p>
<p>For an overview of what REST and our RESTful SMS API is all about you may like to read our <a title="RESTful SMS API Overview" href="/blog/2010/03/sms-gateway/restful-web-services-sms-api-overview/" target="_self">RESTful SMS API Overview</a>.</p>
<p>If you prefer you can use the <a title="simple sms gateway" href="http://www.textmarketer.co.uk/blog/2009/05/sms-gateway/text-marketer-apigateway-spec/">simple SMS gateway</a>, rather than our RESTful implementation.</p>
<p><strong>To get straight into the details, jump to:</strong></p>
<p><a title="Quick Start SMS API" href="#quickstart" target="_self">Quick Start</a><br />
<a title="Error Codes" href="#error_codes">Error codes</a></p>
<p><a title="Sandbox for testing" href="#sandbox">Sandbox</a></p>
<p>You can preform the following actions using the REST web service:</p>
<ul>
<li>send an SMS (<a title="sms post" href="#sms_resource">sms post</a>)</li>
<li>get the number of credits available (<a title="credits get" href="/blog/2010/06/sms-gateway/rest-sms-gateway-api-credits-resource/#get">credits get</a>)</li>
<li>transfer credits from one account to another (<a title="credits post" href="/blog/2010/06/sms-gateway/rest-sms-gateway-api-credits-resource/#post">credits post</a>)</li>
<li>get a list of delivery reports (<a title="deliveryReports get" href="/blog/2010/06/business-sms/rest-sms-gateway-api-deliveryreports-resource/#get">deliveryReports get</a>)</li>
<li>get the contents of a specific delivery report (<a title="deliveryReport get" href="/blog/2010/06/sms-gateway/rest-sms-gateway-api-deliveryreport-resource/#get">deliveryReport get</a>)</li>
<li>check availability of a given keyword on our ShortCode number (<a title="keywords get" href="/blog/2010/06/sms-gateway/rest-sms-gateway-api-keywords-resource/#get">keywords get</a>)</li>
<li>check the names and IDs of your send groups (<a title="Groups GET" href="/blog/2011/04/sms-gateway/rest-sms-gateway-api-group-resource/">groups get</a>)</li>
<li>add number(s) to a send group (<a title="group post" href="/blog/2011/04/sms-gateway/rest-sms-gateway-api-group-resource/#post">group post</a>)</li>
</ul>
<h2><a title="The Resource Identifier" href="#resource_identifier">Specification of the resources</a></h2>
<ol>
<li><a href="#credits_resource">credits</a></li>
<li><a title="deliveryReports resource" href="#deliveryReports_resource">deliveryReports</a></li>
<li><a title="deliveryReport resource" href="#deliveryReport_resource">deliveryReport</a></li>
<li><a title="sms resource" href="#sms_resource">sms</a></li>
<li><a title="keywords resource" href="#keywords_resource">keywords</a></li>
<li><a title="group resource" href="#group_resource">group</a></li>
<li><a title="groups resource" href="#groups_resource">groups</a></li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>QUICK START</strong><br />
Three things are essentially needed to use the REST SMS API:</p>
<ol>
<li>Ability to make a HTTP request
<ul>
<li>e.g. to https://www.textmarketer.biz/services/rest/credits</li>
</ul>
</li>
<li>Ability to read the HTTP response headers
<ul>
<li>e.g. &#8217;200 OK&#8217;</li>
</ul>
</li>
<li>Ability to parse the XML response
<ul>
<li>e.g. &lt;<span class="start-tag">credits</span>&gt;37&lt;/<span class="end-tag">credits</span>&gt;</li>
</ul>
</li>
</ol>
<p><strong>The Request URI </strong><strong>Explained</strong></p>
<p>You will make the HTTP request to a request URI such as:</p>
<pre>https://www.textmarketer.biz/services/rest/credits</pre>
<p>The base request URI is thus composed of :</p>
<p>&#8216;<em><strong>https://www.textmarketer.biz/services/rest/</strong></em><em>&#8216;</em> + a string that denotes the resource to be accessed, e.g. &#8216;<em>credits</em>&#8216;, &#8216;<em>deliveryReports</em>&#8216;, etc.</p>
<p>You can use http instead of https, but https is recommended.</p>
<p>Note that cAsE matters, i.e. &#8216;<em>deliveryReports</em>&#8216; will work, whereas &#8216;<em>deliveryreports</em>&#8216; (lower case &#8216;r&#8217;) will return an error.</p>
<p>You must obviously identify yourself during the request. If you know how to handle HTTP <a href="http://en.wikipedia.org/wiki/Digest_access_authentication" target="_blank">Digest Authentication</a>, that is the preferred method of authentication.</p>
<p>Otherwise you should attach the following to the end of the resource URI:</p>
<pre>?username=myAPIusername&amp;password=myAPIpassword</pre>
<p>Or, in the case of a POST request, such as for sending an SMS, include the username/password parameters in the POST parameters (e.g. see <a title="sms post" href="#sms_resource">sms post</a>).</p>
<p>In our example, the complete URI that results is:</p>
<pre>https://www.textmarketer.biz/services/rest/credits?username=myAPIusername&amp;password=myAPIpassword</pre>
<p>And this should return XML containing the number of credits available on your account.</p>
<p><strong>The HTTP Response Headers</strong></p>
<p>The only vital part of the response headers that you need is the status code. <em>200</em> means a successful request, all other codes returned will be errors.</p>
<p>If you get an error, the status message may give you some extra information about the error. For more details about the error codes and their meanings, see <a title="Error Codes" href="#error_codes" target="_self">Error Codes</a> below.</p>
<p><strong>The XML response</strong></p>
<p>The structure of the XML response is generally quite simple. The response to our <em>credits</em> request example would look like this:</p>
<pre id="line1">&lt;<span class="start-tag">response</span><span class="attribute-name"> processed_date</span>=<span class="attribute-value">"2010-03-19T14:08:40+00:00"</span>&gt;
&lt;<span class="start-tag">credits</span>&gt;37&lt;/<span class="end-tag">credits</span>&gt;
&lt;/<span class="end-tag">response</span>&gt;</pre>
<p>Your preferred programming language will have a method for parsing the XML response to obtain the value.</p>
<p><strong>Example PHP code</strong></p>
<pre>&lt;?php
/**
 * GET request on the 'credits' resource
 */
$url = 'http://www.textmarketer.biz/services/rest/credits';
$username = 'myAPIusername'; // CHANGE THIS!!!
$password = 'myAPIpassword'; // CHANGE THIS!!!
$url = "$url?username=$username&amp;password=$password";

// we're using the curl library to make the request
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, true);
$responseBody = curl_exec($curlHandle);
$responseInfo  = curl_getinfo($curlHandle);
curl_close($curlHandle);

// deal with the response
if ($responseInfo['http_code']==200)
{
	$xml_obj = simplexml_load_string($responseBody);
	$credits = (int) $xml_obj-&gt;credits;
	// do something with the result
	echo $credits;

} else {
	// handle the error
	var_dump($responseBody);
}

?&gt;</pre>
<p>See the <a title="REST SMS API Examples" href="http://www.textmarketer.co.uk/blog/2010/03/campaign-articles/dev/rest-sms-api-code-examples/" target="_self">REST API Code Examples</a> for some more example code that you can use.</p>
<p>That&#8217;s the end of the Quick Start. You know to send the request, check the status code is <em>200</em>, and then parse the XML according to its declared structure.</p>
<p style="color: white;">Error codes</p>
<p><strong>ERROR CODES</strong></p>
<p>The HTTP status codes returned by our REST SMS API follow normal HTTP conventions. An example of the HTTP response headers from a request to our REST API:</p>
<pre>Date: Wed, 24 Mar 2010 14:45:54 GMT
Server: Apache/2.2.3 (Red Hat)
X-Powered-By: PHP/5.2.11 ZendServer/4.0
Content-Length: 317
Connection: close
Content-Type: application/xml

404 Not Found :  (ERR101)</pre>
<p>You see the status code, 404 on the last line. Their meaning of the status codes in the context of our REST SMS API are as follows:</p>
<table border="0">
<tbody>
<tr>
<td><strong>Code</strong></td>
<td><strong>Meaning</strong></td>
</tr>
<tr>
<td>200</td>
<td>OK. We were able to successfully execute the requested operation.</td>
</tr>
<tr>
<td>400</td>
<td>Bad request. There was a problem with your request data, see the status message for details.</td>
</tr>
<tr>
<td>403</td>
<td>You do not have sufficient rights to access the specified resource.</td>
</tr>
<tr>
<td>404</td>
<td>The resource specified could not be found.</td>
</tr>
<tr>
<td>405</td>
<td>The specified method (get, post, put or delete) is not allowed for this resource.</td>
</tr>
<tr>
<td>500</td>
<td>An unexpected error occurred.</td>
</tr>
<tr>
<td>501</td>
<td>The method requested has not been implemented.</td>
</tr>
<tr>
<td>503</td>
<td>Service Unavailable. The Web Service is not currently available to serve your request.</td>
</tr>
</tbody>
</table>
<p>This list is not exhaustive, any code from the <a title="HTTP status  codes" href="http://en.wikipedia.org/wiki/List_of_HTTP_status_codes" target="_blank">complete list of HTTP status codes</a> may be returned.</p>
<p>IMPORTANT NOTE: Error 503 may be returned if you exceed a certain number of requests per minute. You will see an error message similar to: &#8220;Your 201 requests exceed the maximum allowed of 100 requests within 15 minute(s). Please try again later&#8221;. This to reduce load on our servers, in order to guarantee a good service to all our users.  <em>There is no restriction on SMS sends.</em></p>
<p>USEFUL NOTE: the HTTP status message may contain more specific information. If you encounter an unexpected error, the &#8216;(ERRnn)&#8217; found in the status message is useful in any reports you send us.</p>
<p>In addition to the status codes, an error will also produce an XML response containing details of the error. In this example the XML response might look like this:</p>
<pre>&lt;<span class="start-tag">response</span><span class="attribute-name"> processed_date</span>=<span class="attribute-value">"2010-03-24T14:45:54+00:00"</span>&gt;
&lt;<span class="start-tag">errors</span>&gt;
	&lt;<span class="start-tag">error</span><span class="attribute-name"> code</span>=<span class="attribute-value">"404"</span>&gt;Not Found :  (ERR101)&lt;/<span class="end-tag">error</span>&gt;
&lt;/<span class="end-tag">errors</span>&gt;
&lt;/<span class="end-tag">response</span>&gt;</pre>
<p>Some resources, such as <a title="sms resource" href="#sms_resource">http://www.textmarketer.biz/services/rest/sms</a>, have additional error codes specific to the resource. These are documented along with the description of the resource.</p>
<p style="color: white;">Resource Identifier</p>
<p><strong>THE RESOURCE IDENTIFIER</strong></p>
<p>The example of a resource identifier used previously was:</p>
<p><span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px; white-space: pre;">https://www.textmarketer.biz/services/rest/credits</span></p>
<p>All our REST SMS Web Service resource identifiers take the general form:</p>
<pre>PROTOCOL://RESOURCE_NAMESPACE/RESOURCE_NAME[/RESOURCE_ID]</pre>
<p>where</p>
<pre>PROTOCOL = http|https
RESOURCE_NAMESPACE = www.textmarketer.biz/services/rest
RESOURCE_NAME = credits|deliveryReports|deliveryReport|sms|keywords|etc</pre>
<pre>RESOURCE_ID = an_ID (optional) which specifies a particular resource element, e.g. a specific delivery report</pre>
<p>e.g.</p>
<pre>https://www.textmarketer.biz/services/rest/deliveryReport/GatewayAPI_09-02-10</pre>
<p>will access a delivery report named &#8216;<em>GatewayAPI_09-02-10</em>&#8216;.</p>
<p style="color: white;">Resources</p>
<p><strong>RESOURCES</strong></p>
<p>The currently implemented resources are:</p>
<ol>
<li><a href="#credits_resource">credits</a></li>
<li><a title="deliveryReports resource" href="#deliveryReports_resource">deliveryReports</a></li>
<li><a title="deliveryReport resource" href="#deliveryReport_resource">deliveryReport</a></li>
<li><a title="sms resource" href="#sms_resource">sms</a></li>
<li><a title="keywords resource" href="#keywords_resource">keywords</a></li>
<li><a title="group resource" href="#group_resource">group</a></li>
<li><a title="groups resource" href="#groups_resource">groups</a></li>
</ol>
<p><em><strong>1. credits</strong></em></p>
<pre>http://www.textmarketer.biz/services/rest/credits</pre>
<ul>
<li>GET method -<em> </em>get the number of credits currently available on your account</li>
<li><em><span style="font-style: normal;">POST method</span> </em>- transfer credits between accounts</li>
</ul>
<p>See the <a title="credits resource" href="/blog/2010/06/sms-gateway/rest-sms-gateway-api-credits-resource/" target="_self">full description</a> of this resource for details.</p>
<p><em><strong>2. deliveryReports</strong></em></p>
<pre>http://www.textmarketer.biz/services/rest/deliveryReports</pre>
<ul>
<li>GET method - Gets a list of available delivery report names</li>
</ul>
<p>See the <a title="deliveryReports resource" href="/blog/2010/06/business-sms/rest-sms-gateway-api-deliveryreports-resource/" target="_self">full description</a> of this resource for details.</p>
<p><em><strong>3. deliveryReport</strong></em></p>
<pre>http://www.textmarketer.biz/services/rest/deliveryReport/test-190310</pre>
<ul>
<li>GET method - Gets the contents of a delivery report &#8211; the delivery status of sent messages for a given day/campaign.</li>
</ul>
<p>See the <a title="deliveryReport resource" href="/blog/2010/06/sms-gateway/rest-sms-gateway-api-deliveryreport-resource/" target="_self">full description</a> of this resource for details.</p>
<p>NOTE: An individual delivery report that is accessed using this resource shows the current known status of all messages sent on a given day, or for a particular campaign. The REST API resource <em><a title="deliveryReports resource" href="#deliveryReports_resource" target="_self">deliveryReport</a><strong><a title="deliveryReports resource" href="#deliveryReports_resource" target="_self">s</a> </strong></em>(note the trailing s) gets a list of available delivery report names, including delivery reports for campaigns (see <a title="deliveryReports resource" href="#deliveryReports_resource" target="_self">above</a>).</p>
<p><em><strong>4. sms</strong></em></p>
<pre>http://www.textmarketer.biz/services/rest/sms</pre>
<ul>
<li><strong><em>POST method</em></strong> - Used to send an SMS message.</li>
</ul>
<p>See the <a title="sms resource" href="/blog/2010/06/sms-gateway/rest-sms-gateway-api-sms-resource/" target="_self">full description</a> of this resource for details.</p>
<p><em><strong>5. keywords </strong></em></p>
<pre>http://www.textmarketer.biz/services/rest/keywords/mykeyword</pre>
<ul>
<li><strong><em>GET method</em></strong><strong> </strong>- get the availability of a given keyword (see <a href="http://www.textmarketer.co.uk/shortcode_sms.htm" target="_blank">Short Code SMS Service</a>)</li>
</ul>
<p>See the <a title="keywords resource" href="/blog/2010/06/sms-gateway/rest-sms-gateway-api-keywords-resource/" target="_self">full description</a> of this resource for details.</p>
<p><em><strong>6. group</strong></em></p>
<pre>http://www.textmarketer.biz/services/rest/group</pre>
<ul>
<li><strong><em>POST method</em></strong><strong> </strong>- add number(s) to a send group</li>
</ul>
<p>See the <a title="group resource" href="/blog/2011/04/sms-gateway/rest-sms-gateway-api-group-resource/">full description</a> of this resource for details.</p>
<p><em><strong>7. groups</strong></em></p>
<pre>http://www.textmarketer.biz/services/rest/groups</pre>
<ul>
<li><strong><em>GET method</em></strong><strong> </strong>- list the available send groups</li>
</ul>
<p>See the <a href="http://www.textmarketer.co.uk/blog/2011/04/sms-gateway/rest-sms-gateway-api-group-resource/">full description</a> of this resource for details.</p>
<p style="color: white;">Sandbox</p>
<p><strong>TESTING/SANDBOX</strong></p>
<p>A sandbox service is available to allow you to test your integration code without using any credits or executing any function that would modify the data in your account. The service is available at</p>
<p><a title="Sandbox" href="http://sandbox.textmarketer.biz/services/rest">http://sandbox.textmarketer.biz/services/rest</a></p>
<p>i.e. only the hostname changes from <em>www.textmarketer.biz</em> to <em>sandbox.textmarketer.biz</em> within the resource URI.</p>
<p>The sandbox will do the same validation of your request as the live REST API and return the appropriate errors, but will not perform any action that modifies your account data or your credits. Nor will it actually send any SMS messages, so no delivery report will be generated.</p>
<p>NOTE: Accesses to the sandbox is limited to a certain number of requests per minute &#8211; to reduce load on our servers &#8211; in order to guarantee a good service to all our users. Therefore you may prefer to use the Sandbox only to check that individual requests work correctly, rather than testing bulk SMS sends. There is no restriction on SMS sends on the live system.</p>
<img src="http://www.textmarketer.co.uk/wordpress/?ak_action=api_record_view&id=1134&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.textmarketer.co.uk/blog/2010/03/business-sms/rest-sms-api-specification-document/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SMS Gateway Reliability &#8211; The Chain is Only as Strong as the Weakest Link</title>
		<link>http://www.textmarketer.co.uk/blog/2009/11/bulk-sms/sms-gateway-reliability-the-chain-is-only-as-strong-as-the-weakest-link/</link>
		<comments>http://www.textmarketer.co.uk/blog/2009/11/bulk-sms/sms-gateway-reliability-the-chain-is-only-as-strong-as-the-weakest-link/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 12:40:44 +0000</pubDate>
		<dc:creator>Henry</dc:creator>
				<category><![CDATA[Bulk SMS]]></category>
		<category><![CDATA[Business SMS]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[SMS Marketing Ideas & Advice]]></category>
		<category><![CDATA[SMS Providers]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Text Messaging Software]]></category>
		<category><![CDATA[bulk sms reliability]]></category>
		<category><![CDATA[most reliable bulk sms service]]></category>
		<category><![CDATA[reliable sms gateway]]></category>
		<category><![CDATA[sms gateway reliability]]></category>

		<guid isPermaLink="false">http://87.106.109.73/blog/?p=708</guid>
		<description><![CDATA[Most bulk SMS providers , (including ourselves) will take great pains to point out the merits of direct connections to the UK Networks, and a direct connection is indeed essential for a first class, reliable sms service. But that is only part of the story. Just as crucial to reliability are &#8230; <a href="http://www.textmarketer.co.uk/blog/2009/11/bulk-sms/sms-gateway-reliability-the-chain-is-only-as-strong-as-the-weakest-link/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Most bulk SMS providers , (including ourselves) will take great pains to point out the merits of direct connections to the UK Networks, and a direct connection is indeed essential for a <a title="bulk sms reliability" href="http://www.textmarketer.co.uk/reliable-consistent-bulk-sms.htm" target="_blank">first class, reliable sms service</a>.</p>
<p>But that is only part of the story. Just as crucial to reliability are the systems in place that connect to the networks. There&#8217;s no point in have a direct Network connection if the servers are prone to falling over on a regualr basis. The chain is only as strong as the weakest link, so the saying goes.</p>
<p>So when companies are assessing different sms gateway providers, they should be asking where the provider&#8217;s systems are hosted. Server hosting companies vary enormously in quality and offer different services level agreements. SMS gateway providers need to be using specialist hosting companies that will guarantee server up&#8217; time.</p>
<p>In order to eliminate any server issues, Text Marketer uses <a title="sms gateway reliability" href="http://www.rackspace.co.uk/rackspace-home/" target="_blank">Rack Space </a>who is recognized as the global market leader in server hosting. They offer a guarantee of 100% up time.</p>
<p>In addition to bullet proof server hosting, Text Marketer has also developed a system architecture that maximizes the reliability of the <a title="bulk sms service" href="http://www.textmarketer.co.uk/bulksms/sms-bulk.htm" target="_blank">sms service</a>. Now for non-techies, all this means is that we&#8217;ve done all we can to make sure your bulk sms campaigns are delivered as planned. For the more technically minded, you may be interested in a quick overview of how this is achieved.</p>
<p><strong>1. Our servers are based in a load balanced, clustered environment.<br />
</strong>The idea is that internet load is balanced between machines and should one machine fall over another can take its place. The application server is the machine that does the processing of our code.</p>
<p><strong>2. Our servers have RAID 1 (or mirrored) disks<br />
</strong>This is where you have 2 hard disks in the server that mirror each other, should one fail, the system can keep running.</p>
<p><strong>3.</strong> <strong>We use 64 bit Unix</strong><br />
All this really means is that we are using the most up to date operating system on our servers.</p>
<p><strong>4. Managed backup<br />
</strong>We have systems in place that back our data up to an off-line storage medium. This means should everything fail we still have the data to rebuild our systems.</p>
<p>If you have any specific technical queries, Nick Rich, our Technical Director is the man to speak to. He can be contacted on <strong>0117 2050202</strong></p>
<img src="http://www.textmarketer.co.uk/wordpress/?ak_action=api_record_view&id=708&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.textmarketer.co.uk/blog/2009/11/bulk-sms/sms-gateway-reliability-the-chain-is-only-as-strong-as-the-weakest-link/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>System Update &#8211; Upload your mobile numbers straight from Microsoft Excel</title>
		<link>http://www.textmarketer.co.uk/blog/2009/10/bulk-sms/system-update-upload-your-mobile-numbers-straight-from-microsoft-excel/</link>
		<comments>http://www.textmarketer.co.uk/blog/2009/10/bulk-sms/system-update-upload-your-mobile-numbers-straight-from-microsoft-excel/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 08:47:45 +0000</pubDate>
		<dc:creator>Henry</dc:creator>
				<category><![CDATA[Bulk SMS]]></category>
		<category><![CDATA[Business SMS]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[System FAQs]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Text Messaging Software]]></category>
		<category><![CDATA[sms marketing]]></category>
		<category><![CDATA[upload numbers to a group]]></category>
		<category><![CDATA[upload sms numbers]]></category>

		<guid isPermaLink="false">http://87.106.109.73/blog/?p=630</guid>
		<description><![CDATA[The development team at Text Marketer have had a busy few months and the latest system improvement has now been launched. Following customer research, we have now built into all accounts the ability to upload numbers straight from Excel, without having to save the database as a .csv or .txt &#8230; <a href="http://www.textmarketer.co.uk/blog/2009/10/bulk-sms/system-update-upload-your-mobile-numbers-straight-from-microsoft-excel/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The development team at Text Marketer have had a busy few months and the latest system improvement has now been launched.</p>
<p>Following customer research, we have now built into all accounts the ability to upload numbers straight from Excel, without having to save the database as a .csv or .txt file.<br />
This improvement will save time when uploading your numbers and makes sending your <a title="bulk sms service" href="http://www.textmarketer.co.uk/bulksms/sms-bulk.htm" target="_blank">bulk sms campaigns </a>even easier.</p>
<p>When you are preparing your database for upload, make sure that your list of numbers is in column A and that there is no column header. Duplicates and badly formatted numbers are automatically removed in the upload process.<br />
The following mobile number formats can be processed.<br />
07900122321<br />
447900122321<br />
7900122321<br />
+447900122321<br />
Please see our <a title="Upload sms numbers to a group" href="http://www.textmarketer.co.uk/blog/2009/07/system-faqs/upload-a-list-of-mobile-numbers-to-a-group/" target="_blank">detailed instructions </a>if you would like more information on uploading numbers to a group.</p>
<p>We&#8217;re always looking for ways of improving our systems and big thanks to all our customers who gave us such useful feedback. If you do have any ideas for how you think your Text Marketer account can be improved, please let us know, we&#8217;d love to hear from you.</p>
<img src="http://www.textmarketer.co.uk/wordpress/?ak_action=api_record_view&id=630&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.textmarketer.co.uk/blog/2009/10/bulk-sms/system-update-upload-your-mobile-numbers-straight-from-microsoft-excel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top Tips for Writing Successful SMS Marketing Messages</title>
		<link>http://www.textmarketer.co.uk/blog/2009/08/campaign-articles/top-tips-for-writing-successful-sms-marketing-messages/</link>
		<comments>http://www.textmarketer.co.uk/blog/2009/08/campaign-articles/top-tips-for-writing-successful-sms-marketing-messages/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 08:13:47 +0000</pubDate>
		<dc:creator>Henry</dc:creator>
				<category><![CDATA[Bulk SMS]]></category>
		<category><![CDATA[Business SMS]]></category>
		<category><![CDATA[Campaign Articles]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[SMS Advertising]]></category>
		<category><![CDATA[SMS Marketing Ideas & Advice]]></category>
		<category><![CDATA[Text Messaging Software]]></category>
		<category><![CDATA[example text marketing message]]></category>
		<category><![CDATA[template bulk sms messages]]></category>
		<category><![CDATA[template example sms messages]]></category>

		<guid isPermaLink="false">http://87.106.109.73/blog/?p=470</guid>
		<description><![CDATA[Customers often ask us whether we have any example sms messages that they can use as a templates for their bulk sms marketing campaigns.  Now obviously each company needs to tailor the text message specifically for their own target market. There are however a few golden rules that can help &#8230; <a href="http://www.textmarketer.co.uk/blog/2009/08/campaign-articles/top-tips-for-writing-successful-sms-marketing-messages/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-472" title="sb10064654f-001" src="http://www.textmarketer.co.uk/blog/wp-content/uploads/2009/08/woman-sms.jpg" alt="sb10064654f-001" width="127" height="170" />Customers often ask us whether we have any example sms messages that they can use as a templates for their bulk sms marketing campaigns. </p>
<p>Now obviously each company needs to tailor the text message specifically for their own target market. There are however a few golden rules that can help you get the best possible response from your <a href="http://www.textmarketer.co.uk/bulksms/sms-bulk.htm" target="_blank">bulk text campaign</a>.</p>
<p>Below these, we have also included a few example template messages that we hope provide you with inspiration.</p>
<h3>Don&#8217;t Use Text Speak</h3>
<p>Some of your target audience won&#8217;t mind text speak&#8217; at all but a good many of them will be infuriated by it! Text speak can be confusing and can project an unprofessional image.</p>
<h3>Don&#8217;t Cram In Too Many Points?</h3>
<p>A text is only 160 characters so don&#8217;t be tempted to crowbar in loads of offers. Keep it simple, concise and clear.</p>
<h3>Tell Your Audience Who You Are.</h3>
<p>This may seem an obvious point but don&#8217;t assume your audience will immediately know who the text is from. Within your account, you can change the sender name so that the customer knows who it&#8217;s from before the text is even opened.</p>
<h3>Have A Strong Call To Action&#8217;.</h3>
<p>Make sure that you make it clear what you want the customer to do. Don&#8217;t just quote your phone number but ask the customer to dial it. E.g Call us now on 080012345678</p>
<h3>Use An Attention Grabber&#8217;</h3>
<p>Try to start your text with an attention grabber that will arouse curiosity and compel the customer to read on. This is usually a single or couple of words, often in capitals. The word news&#8217; is particularly effective.</p>
<h3>Template SMS Messages&#8230;</h3>
<p><em>NEWS! EJ Wines are now extending their 20% discount offer until 6 pm this Friday. For amazing offers on all our wines, call us now on 01234567890. </em><em>www.ejwines.co.uk</em></p>
<p><em>Weather forecast is cold and wet. Cosy up at The Rock Inn from £125.00 for 2 nights B+B. Roaring fire, local ales, fine wines and dining. Call 0123456789 or reply ROCK to this text.</em></p>
<p><em>Beat the queue! Show this text at Metropolis Nightclub before 10pm tonight and we&#8217;ll take you through the members&#8217; only entrance. Free single shot at the bar with this text.</em></p>
<p><em>MOT NOW DUE! Your car is now due for its MOT. Please call Mullins Ford now on 012345 67890 to book your car in. </em><em>www.mullinsford.co.uk</em></p>
<p><em>JOB ALERT! Please call Access Recruit now on 012345 67890. We have a number of exciting new vacancies that match your skills and experience. </em><em>www.accessrecruit.net</em></p>
<p><em>A massive 50% off all sports products at Campus Leisure this weekend. Logon now to www.campusleisure.biz. This offer will end at 7 pm on Sunday, so logon now and quote code X13.</em></p>
<img src="http://www.textmarketer.co.uk/wordpress/?ak_action=api_record_view&id=470&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.textmarketer.co.uk/blog/2009/08/campaign-articles/top-tips-for-writing-successful-sms-marketing-messages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.NET Examples</title>
		<link>http://www.textmarketer.co.uk/blog/2009/07/sms-gateway/net-examples/</link>
		<comments>http://www.textmarketer.co.uk/blog/2009/07/sms-gateway/net-examples/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 11:00:09 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[All SMS Gateway Documentation]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://87.106.109.73/blog/?p=383</guid>
		<description><![CDATA[Example of a .NET Bulk SMS Gateway / API integration For more information regarding the bulk sending API click here. A simple example for sending SMS via a .NET method Here&#8217;s a stand-alone .Net method: private static string SendSms(string p_userName, string p_password, string p_orig, string p_number, string p_message, bool p_respondInXml) &#8230; <a href="http://www.textmarketer.co.uk/blog/2009/07/sms-gateway/net-examples/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h2>Example of a .NET Bulk SMS Gateway / API integration</h2>
<p><a title="Bulk SMS API" href="http://www.textmarketer.co.uk/blog/2009/05/sms-gateway/text-marketer-apigateway-spec/" target="_blank">For more information regarding the bulk sending API click here.</a></p>
<p>A simple example for sending SMS via a .NET method</p>
<p><span style="font-family: Arial; font-size: x-small;">Here&#8217;s a stand-alone .Net method:</span></p>
<p><span style="font-family: 'Courier New'; color: #0000ff; font-size: x-small;">private</span><span style="font-family: 'Courier New'; font-size: x-small;"> </span><span style="font-family: 'Courier New'; color: #0000ff; font-size: x-small;">static</span><span style="font-family: 'Courier New'; font-size: x-small;"> </span><span style="font-family: 'Courier New'; color: #0000ff; font-size: x-small;">string</span><span style="font-family: 'Courier New'; font-size: x-small;"> SendSms(</span><span style="font-family: 'Courier New'; color: #0000ff; font-size: x-small;">string</span><span style="font-family: 'Courier New'; font-size: x-small;"> p_userName, </span><span style="font-family: 'Courier New'; color: #0000ff; font-size: x-small;">string</span><span style="font-family: 'Courier New'; font-size: x-small;"> p_password, </span><span style="font-family: 'Courier New'; color: #0000ff; font-size: x-small;">string</span><span style="font-family: 'Courier New'; font-size: x-small;"> p_orig, </span><span style="font-family: 'Courier New'; color: #0000ff; font-size: x-small;">string</span><span style="font-family: 'Courier New'; font-size: x-small;"> p_number, </span><span style="font-family: 'Courier New'; color: #0000ff; font-size: x-small;">string</span><span style="font-family: 'Courier New'; font-size: x-small;"> p_message, </span><span style="font-family: 'Courier New'; color: #0000ff; font-size: x-small;">bool</span><span style="font-family: 'Courier New'; font-size: x-small;"> p_respondInXml) {</span></p>
<p><span style="font-family: 'Courier New'; color: #2b91af; font-size: x-small;">StringBuilder</span><span style="font-family: 'Courier New'; font-size: x-small;"> requestUrl = </span><span style="font-family: 'Courier New'; color: #0000ff; font-size: x-small;">new</span><span style="font-family: 'Courier New'; font-size: x-small;"> </span><span style="font-family: 'Courier New'; color: #2b91af; font-size: x-small;">StringBuilder</span><span style="font-family: 'Courier New'; font-size: x-small;">();</span><br />
<span style="font-family: 'Courier New'; font-size: x-small;">requestUrl.Append(</span><span style="font-family: 'Courier New'; color: #a31515; font-size: x-small;">&#8220;<a href="http://www.textmarketer.biz/gateway/">http://www.textmarketer.biz/gateway/</a>&#8220;</span><span style="font-family: 'Courier New'; font-size: x-small;">);</span><br />
<span style="font-family: 'Courier New'; font-size: x-small;">requestUrl.Append(</span><span style="font-family: 'Courier New'; color: #a31515; font-size: x-small;">&#8220;?username=&#8221;</span><span style="font-family: 'Courier New'; font-size: x-small;">).Append(</span><span style="font-family: 'Courier New'; color: #2b91af; font-size: x-small;">HttpUtility</span><span style="font-family: 'Courier New'; font-size: x-small;">.UrlEncode(p_userName));</span><br />
<span style="font-family: 'Courier New'; font-size: x-small;">requestUrl.Append(</span><span style="font-family: 'Courier New'; color: #a31515; font-size: x-small;">&#8220;&amp;password=&#8221;</span><span style="font-family: 'Courier New'; font-size: x-small;">).Append(</span><span style="font-family: 'Courier New'; color: #2b91af; font-size: x-small;">HttpUtility</span><span style="font-family: 'Courier New'; font-size: x-small;">.UrlEncode(p_password));</span><br />
<span style="font-family: 'Courier New'; font-size: x-small;">requestUrl.Append(</span><span style="font-family: 'Courier New'; color: #a31515; font-size: x-small;">&#8220;&amp;orig=&#8221;</span><span style="font-family: 'Courier New'; font-size: x-small;">).Append(</span><span style="font-family: 'Courier New'; color: #2b91af; font-size: x-small;">HttpUtility</span><span style="font-family: 'Courier New'; font-size: x-small;">.UrlEncode(p_orig));</span><br />
<span style="font-family: 'Courier New'; font-size: x-small;">requestUrl.Append(</span><span style="font-family: 'Courier New'; color: #a31515; font-size: x-small;">&#8220;&amp;number=&#8221;</span><span style="font-family: 'Courier New'; font-size: x-small;">).Append(p_number);</span><br />
<span style="font-family: 'Courier New'; font-size: x-small;">requestUrl.Append(</span><span style="font-family: 'Courier New'; color: #a31515; font-size: x-small;">&#8220;&amp;message=&#8221;</span><span style="font-family: 'Courier New'; font-size: x-small;">).Append(</span><span style="font-family: 'Courier New'; color: #2b91af; font-size: x-small;">HttpUtility</span><span style="font-family: 'Courier New'; font-size: x-small;">.UrlEncode(p_message));</span><br />
<span style="font-family: 'Courier New'; color: #0000ff; font-size: x-small;">if</span><span style="font-family: 'Courier New'; font-size: x-small;"> (p_respondInXml) {</span><br />
<span style="font-family: 'Courier New'; font-size: x-small;">requestUrl.Append(</span><span style="font-family: 'Courier New'; color: #a31515; font-size: x-small;">&#8220;&amp;option=&#8221;</span><span style="font-family: 'Courier New'; font-size: x-small;">).Append(</span><span style="font-family: 'Courier New'; color: #a31515; font-size: x-small;">&#8220;xml&#8221;</span><span style="font-family: 'Courier New'; font-size: x-small;">);</span><br />
<span style="font-family: 'Courier New'; font-size: x-small;">}</span><br />
<span style="font-family: 'Courier New'; color: #2b91af; font-size: x-small;">WebRequest</span><span style="font-family: 'Courier New'; font-size: x-small;"> webRequest = </span><span style="font-family: 'Courier New'; color: #2b91af; font-size: x-small;">HttpWebRequest</span><span style="font-family: 'Courier New'; font-size: x-small;">.Create(requestUrl.ToString());</span><br />
<span style="font-family: 'Courier New'; color: #2b91af; font-size: x-small;">WebResponse</span><span style="font-family: 'Courier New'; font-size: x-small;"> webResponse = webRequest.GetResponse();</span><br />
<span style="font-family: 'Courier New'; color: #2b91af; font-size: x-small;">Stream</span><span style="font-family: 'Courier New'; font-size: x-small;"> responseStream = webResponse.GetResponseStream();</span><br />
<span style="font-family: 'Courier New'; color: #2b91af; font-size: x-small;">StreamReader</span><span style="font-family: 'Courier New'; font-size: x-small;"> streamReader = </span><span style="font-family: 'Courier New'; color: #0000ff; font-size: x-small;">new</span><span style="font-family: 'Courier New'; font-size: x-small;"> </span><span style="font-family: 'Courier New'; color: #2b91af; font-size: x-small;">StreamReader</span><span style="font-family: 'Courier New'; font-size: x-small;">(responseStream);</span><br />
<span style="font-family: 'Courier New'; color: #0000ff; font-size: x-small;">return</span><span style="font-family: 'Courier New'; font-size: x-small;"> streamReader.ReadToEnd();</span><br />
<span style="font-family: 'Courier New'; font-size: x-small;">}</span><br />
<span style="font-family: Arial; font-size: x-small;">And here&#8217;s an example of calling it:</span></p>
<p><span style="font-family: 'Courier New'; color: #0000ff; font-size: x-small;">string</span><span style="font-family: 'Courier New'; font-size: x-small;"> response = SendSms(</span><span style="font-family: 'Courier New'; color: #a31515; font-size: x-small;">&#8220;MyUsername&#8221;</span><span style="font-family: 'Courier New'; font-size: x-small;">, </span><span style="font-family: 'Courier New'; color: #a31515; font-size: x-small;">&#8220;MyPassword&#8221;</span><span style="font-family: 'Courier New'; font-size: x-small;">, </span><span style="font-family: 'Courier New'; color: #a31515; font-size: x-small;">&#8220;MyNumber&#8221;</span><span style="font-family: 'Courier New'; font-size: x-small;">, </span><span style="font-family: 'Courier New'; color: #a31515; font-size: x-small;">&#8220;4477777777&#8243;</span><span style="font-family: 'Courier New'; font-size: x-small;">, </span><span style="font-family: 'Courier New'; color: #a31515; font-size: x-small;">&#8220;This is a test&#8221;</span><span style="font-family: 'Courier New'; font-size: x-small;">, </span><span style="font-family: 'Courier New'; color: #0000ff; font-size: x-small;">true</span><span style="font-family: 'Courier New'; font-size: x-small;">);</span></p>
<p><span style="font-family: 'Courier New'; font-size: x-small;"><br />
</span></p>
<img src="http://www.textmarketer.co.uk/wordpress/?ak_action=api_record_view&id=383&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.textmarketer.co.uk/blog/2009/07/sms-gateway/net-examples/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Supported and Unsupported characters in Text Messages &#8211; GSM Character Set</title>
		<link>http://www.textmarketer.co.uk/blog/2009/07/bulk-sms/supported-and-unsupported-characters-in-text-messages-gsm-character-set/</link>
		<comments>http://www.textmarketer.co.uk/blog/2009/07/bulk-sms/supported-and-unsupported-characters-in-text-messages-gsm-character-set/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 08:27:09 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[All Bulk SMS Account Documentation]]></category>
		<category><![CDATA[All SMS Gateway Documentation]]></category>
		<category><![CDATA[Bulk SMS]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[bulk]]></category>
		<category><![CDATA[characters]]></category>
		<category><![CDATA[gsm]]></category>
		<category><![CDATA[sms]]></category>
		<category><![CDATA[supported]]></category>
		<category><![CDATA[unsupported]]></category>

		<guid isPermaLink="false">http://87.106.109.73/blog/?p=345</guid>
		<description><![CDATA[When constructing the message for your SMS Marketing campaign you should be aware that not all characters are supported by the GSM networks. They have a specific character set that they work to. It shouldn&#8217;t be a mjor concern to 99%+ of people as almost all common characters are supported. &#8230; <a href="http://www.textmarketer.co.uk/blog/2009/07/bulk-sms/supported-and-unsupported-characters-in-text-messages-gsm-character-set/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When constructing the message for your SMS Marketing campaign you should be aware that not all characters are supported by the GSM networks. They have a specific character set that they work to. It shouldn&#8217;t be a mjor concern to 99%+ of people as almost all common characters are supported.</p>
<p>For your information here are a list of the supported characters;</p>
<p>&nbsp;</p>
<p>?<a href="http://www.textmarketer.co.uk/blog/wp-content/uploads/2009/07/GSM-7-bit-default-set.jpg"><img class="aligncenter size-full wp-image-2470" title="GSM 7 bit default set" src="http://www.textmarketer.co.uk/blog/wp-content/uploads/2009/07/GSM-7-bit-default-set.jpg" alt="" width="378" height="448" /></a></p>
<p>If you are using our <a href="http://www.textmarketer.co.uk/free-bulk-sms-software.htm">campain bulk sms system</a> then you will be alerted if you use any unsupported characters when you submit the sms campaign.</p>
<p>For <a href="http://www.textmarketer.co.uk/sms-gateway.htm">SMS Gateway</a> customers, you will receive a fail response for any messages submitted with unsupported characters.</p>
<img src="http://www.textmarketer.co.uk/wordpress/?ak_action=api_record_view&id=345&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.textmarketer.co.uk/blog/2009/07/bulk-sms/supported-and-unsupported-characters-in-text-messages-gsm-character-set/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Concatenation and Bulk sending</title>
		<link>http://www.textmarketer.co.uk/blog/2009/07/campaign-articles/concatenation-and-bulk-sending/</link>
		<comments>http://www.textmarketer.co.uk/blog/2009/07/campaign-articles/concatenation-and-bulk-sending/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 14:41:48 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[All Bulk SMS Account Documentation]]></category>
		<category><![CDATA[Campaign Articles]]></category>
		<category><![CDATA[Documentation]]></category>

		<guid isPermaLink="false">http://87.106.109.73/blog/?p=314</guid>
		<description><![CDATA[Feature Upgrade API customers can now send messages up to 612 characters long. If you exceed 160 characters you automatically covert to concatenation sending, this has the following connotations. Each message consists of a 153 character &#8216;chunk&#8217; (not 160 chars) the extra characters are used to glue the messages together. &#8230; <a href="http://www.textmarketer.co.uk/blog/2009/07/campaign-articles/concatenation-and-bulk-sending/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h2>Feature Upgrade</h2>
<p>API customers can now send messages up to 612 characters long. If you exceed 160 characters you automatically covert to concatenation sending, this has the following connotations. Each message consists of a 153 character &#8216;chunk&#8217; (not 160 chars) the extra characters are used to glue the messages together. Therefore a message that is 307 characters long will require 3 messages to send.</p>
<p>The API xml response has also be updated to include the element:</p>
<pre>&lt;credits_used&gt;&lt;/credits_used&gt;</pre>
<p>This element contains the number of credits used for that message send.</p>
<p><a href="http://www.textmarketer.co.uk/blog/2009/05/sms-gateway/text-marketer-apigateway-spec">API bulk sending specification</a></p>
<img src="http://www.textmarketer.co.uk/wordpress/?ak_action=api_record_view&id=314&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.textmarketer.co.uk/blog/2009/07/campaign-articles/concatenation-and-bulk-sending/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

