Tools and News for Developers using the AllClients Platform

AddContact

Overview

Adds a contact to the database via an http form post.  A successful post will return a success message and the contactid for the new contact.

Post Url

https://www.allclients.com/api/2/AddContact.aspx
  • SSL is requred
  • White Label CRM Customers: Replace www.allclients.com with your White Label CRM domain name.

Form Fields

Field Max Length* Required Notes
response_type   No Default results will be returned in XML. Set this field value to json to return results in JSON format
accountid   Yes Must be numeric. Account ID for this account. Found in Settings > API Settings or for White Label CRM in the Admin control panel
apikey   Yes API Key for this account. Found in Settings > API Settings or for White Label CRM in the Admin control panel
teammemberid   No Must be numeric. Team Member ID. Defaults to 0 (Account Owner). If a team member is selected that does not “own” a database, the new contact will be put into the database that the user shares.
firstname 50 Yes Database requires both first and last name
lastname 50 Yes Database requires both first and last name
birthday 10 No Birthday year is optional. Use only formats MM/DD or MM/DD/YYYY. Zero pad leading digits, so month and day are always 2 digits. January 5th is 01/05.
otherfirstname 50 No  
otherlastname 50 No  
otherbirthday 10 No Birthday year is optional. Use only formats MM/DD or MM/DD/YYYY. Zero pad leading digits, so month and day are always 2 digits. January 5th is 01/05.
company 50 No  
address 50 No  
city 50 No  
state 20 No Recommended that this be the 2 digit state code for US addresses
postalcode 20 No  
phone1 20 No Will automatically be formatted to (xxx) xxx-xxxx
phone1note 20 No Recommended that description is used if known (work, home, mobile, etc…)
phone1textoptin 1 No Use value of “1” to opt in Phone 1 for texting
phone2 20 No Will automatically be formatted to (xxx) xxx-xxxx
phone2note 20 No  
phone2textoptin 1 No Use value of “1” to opt in Phone 2 for texting
phone3 20 No Will automatically be formatted to (xxx) xxx-xxxx
phone3note 20 No  
phone3textoptin 1 No Use value of “1” to opt in Phone 3 for texting
phone4 20 No Will automatically be formatted to (xxx) xxx-xxxx
phone4note 20 No  
phone4textoptin 1 No Use value of “1” to opt in Phone 4 for texting
fax 20 No Will automatically be formatted to (xxx) xxx-xxxx
email 75 No  
otheremail 75 No  
custom1 50 No Recommended that you only use custom fields when user’s exact custom field mapping is known
    …   …   … Custom 1 through 20
custom20 50 No  
memo 50 No Brief memo for contact. This is not a note, but a brief memo that shows up on the contact’s page. Recommended less than 100 characters.
category 50 No Must match the name of an existing Category exactly. Any mismatch will result in the category not being assigned.
category2 50 No
Must match the name of an existing Category2 exactly. Any mismatch will result in the category2 not being assigned. (This is the customizable category)
source 50 No Must match the name of an existing Source exactly. Any mismatch will result in the source not being assigned.
othersystemid 32 No For tracking the ID of this contact in another system
addednote   No When a contact is added via the API, a note is added to the contact record. The default is “Contact Added via API”. You can override the default note with this field.
referredbyid   No The Contact ID of the referring contact.
adddate   No Override the default current timestamp. Also include a time, since server time is US Central. If you don’t know a time, we suggest you use noon for your time zone, otherwise the displayed date may be a day early based on your time zone. Example: 1/30/2001 2:00PM

* An error will not result if Max Length is exceeded. Data will be trimmed to this length. 

Sample Results

Success Message

<?xml version="1.0"?>
<results>
    <message>Success</message>
    <contactid>15631</contactid>
</results>

Sample Failure Message

<?xml version="1.0"?>
<results>
    <error>Authentication failed</error>
</results>