SMS
Contacts
Appointments

Add Contact

https://www.titanly.net/api/contacts/addContact.php
Name Status Description
ApiKey Required Your company API Key which can be found in the dashboard under account.
XmlRAW Required Because of its complexity we use XML for this page. Please see the example below for formating.
Name Status Description
contact Payload This is the Contact ID from our system for your records.
Base Send Example
PHP
<?php
	//Setup Variables
	$url = "https://www.titanly.net/api/contacts/addContact.php";
	$fields['ApiKey'] = urlencode('Your API Key');
	$fields['XmlRAW'] = urlencode('The XML for the contact, see the example below');

	//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 XML
XML Outbound
<Root>
	<Contact>
		<id>123</id>
		<type>this is the type of the contact 1=normal, 2=company</type>
		<Field>
			<key>Nmae</key>
			<value>Anyname</value>
		</Field>
		<Field>
			<key>Phone</key>
			<value>Anyphone</value>
		</Field>
		.
		.
		.
		<Field>
			<key>your field name</key>
			<value>your value</value>
		</Field>
	</Contact>
</Root>
Base Payload
Payload
<Root>
	<response>success</response>
	<message> </message>
	<Data>
		<contact>123</contact>
	</Data>
</Root>