SMS
Contacts
Appointments

Get Available Numbers

Get available numbers within a specified area code. You can use Buy Number to purchase the number you want from the returned XML list.
https://www.titanly.net/apisms/numbers/getAvailableNumbers.php
Name Status Description
ApiKey Required Your company Api Key which can be found in the dashboard under account.
AreaCode Required The area code you want to get a list of available number for.
Type Required The type of number you want to get a list of. Local "1" or Toll Free "2".
Base Example
PHP
<?php
	//Setup Variables
	$url = "https://www.titanly.net/api/sms/numbers/getAvailableNumbers.php";
	$fields['ApiKey'] = urlencode('Your API Key');
	$fields['AreaCode'] = urlencode('Area Code that you want a list of numbers from');
	$fields['Type'] = urlencode('1 [1=local, 2=toll free]');

	//Turn the $fields array into a POST string.
	$fieldString = '';
	foreach($fields as $key=>$value)
	{ 
		$fieldString .= $key.'='.$value.'&'; 
	}
	rtrim($fieldString, '&');

	// Use Curl To send the reqeust
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, $url);
	curl_setopt($ch, CURLOPT_POST, count($fields));
	curl_setopt($ch, CURLOPT_POSTFIELDS, $fieldString);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
	$userData = curl_exec($ch);
	$info = curl_getinfo($ch);
	curl_close($ch);
?>
Base Payload
Payload
<Root>
	<response>success</response>
	<message> </message>
	<Data>
		<Number>
			<num>+1234567890</num>
			<pretty>1(123)456-7890</pretty>
			<zip>Zip code</zip>
		</Number>
		<Number>
			<num>+12432567890</num>
			<pretty>1(243)256-7890</pretty>
			<zip>Zip code</zip>
		</Number>
	</Data>
</Root>