https://www.titanly.net/api/contacts/addContactField.php
Add Contact Field
Adding a Contact Field to the system will give you a custom variable that you can then fill out for your contacts.
Name | Status | Description |
---|---|---|
ApiKey | Required | Your API key found in your account area. |
Name | Required | This is the name of the custom field you want to add to your contact system. |
Pos | Required | The position in which the new field will appear in a list. |
Dashboard | Optional | 1=show on the dashboard. 0=Do not show on the dashboard. 0 is default. |
Required | Optional | 1=Required, 0=Not required. 0 is the default. The required field denotes if a field is required to be filled out in order to enter a contact. Automated contact generation will override this setting when needed. An example of this is when the SMS system logs a new contact, that system will only have a phone number to enter. |
Unique | Optional | 1=Unique, 0=Not Unique. 0 is the default. Unique denotes if a field is considered to be unique or not. A Unique field is one of the ways we attempt to merge contacts. EX) If a user signs up with 2 separate sales funnels using the same information, the system will attempt to merge the new data into the same contact. |
Base Example
PHP
<?php //Setup Variables $url = "https://www.titanly.net/api/contacts/addContactField.php"; $fields['ApiKey'] = urlencode('Your API Key'); $fields['Name'] = urlencode('Name of the new field'); $fields['Pos'] = urlencode('Interger Position in which the field will appear on a list'); $fields['Dashboard'] = urlencode('0 [can be 0, or 1]'); $fields['Required'] = urlencode('0 [can be 0, or 1]'); $fields['Unique'] = urlencode('0 [can be 0, or 1]'); //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> <contactField>123</contactField> </Data> </Root>