SMS
Contacts
Appointments

Add Group

Add or edit a new group of contacts associated with a number. You can then send messages to a specific group and allow people to join a group through texting back a keyword.
https://www.titanly.net/api/sms/groups/addGroup.php
Name Status Description
Name Required The name of the group.
Phone Required The company number to associate the group with.
Keyword Required A new keyword. If someone texts back the keyword they will be added to the group.
ApiKey Required Your company API Key which can be found in the dashboard under account.
Base Example
PHP
<?php
	//Setup Variables
	$url = "https://www.titanly.net/api/sms/groups/addGroup.php";
	$fields['ApiKey'] = urlencode('Your API Key');
	$fields['Name'] = urlencode('Name of the group');
	$fields['Phone'] = urlencode('From Phone Number to associate with the group');
	$fields['Keyword'] = urlencode('The Keyword that adds contacts to the group');

		
	//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);
?>
Example Payload
PHP
<Root>
 	<response>success</response>
 	<message> </message>
 	<Data>
 		<groupId>1234</groupId>
 	</Data>
 </Root>