Documentation

LogIn

This API is used to add a new contact in the CRM under the company account.
if the contact found (unique by Email), the info for the contact will be updated not adding a new record.

Method: Get/Post

Base URL : https://hubbucs.com/site/api/crm_add_contact
Mandatory Parameters Sample Description
key 374593457034859 The company account API key, you can get from company settings > API settings


Optional Parameters Sample Description
contact_id 876566 the contact id, if exists, the data below will be used to update the contact info
contact_external_id 876566 the external contact id, if exists, the data below will be used to update the contact info (if sent with contact_id) contact_id has a higher priority
email [email protected] email for the new contact, if a contact with the email already exists, the contact will be updated
phone 5645645456 The phone number for the contact, if a contact with the phone already exists, the contact will be updated
create_new_contact 1 or 2 1: create new contact if not exists (Default value if not sent)
2: Don't create new contact if not exists
match_with_email Possible Values (1 OR 2) 1: Yes match with email (default value), 2 No: dont match with email
match_with_phone Possible Values (1 OR 2) 1: Yes match with phone , 2 No: dont match with phone (default value)
check_name Possible Values (1 OR 2) if set to 1 : Name will be used to search existing contacts as a unique identifier, if set to 2 or not sent(default value): Name will not be used to check existing contacts as a unique identifier
fullname mike douglas The Full name for the contact (if exists, firstname and lastname parameters will be ignored)
firstname mike The first name for the contact
lastname douglas The last name for the contact
timestamp_last_activity Possible Values (1 OR 2) if set to 1 or not sent (default value): last activity timestamp will not be changed, if set to 2 : Last activity timestamp will be changed to the time of the API call request
new_company_name company XY A new company for the contact, which will be created and link the contact to it, if the contact wasn't linked to a company before, if the contact was linked to a company, this will be ignored
facebook facebook ULR or Facebook name The Facebook page or name for the contact
twitter twitter ULR or twitter name The twitter account for the contact
skype skype username The skype username account for the contact
linkedin Linkedin username The Linkedin username account for the contact
pinterest pinterest username The pinterest account for the contact
googlePlus googlePlus username The googlePlus account for the contact
instagram instagram username The instagram account for the contact
source campaign1 A Friendly name, you can add to know the source of contact, if not exists in the settings, it will be added automatically
contact_status text status of contact, if not exists in the settings, it will be added automatically
contact_type text Contact type, if not exists in the settings, it will be added automatically
tags new customer, campaign1, call me Tags you want to add to the contact to use it later on, add as many tags , split by ","
remove_tags new customer, campaign1, call me Tags you want to remove from the contact if the contact already exists , split by ","
notifyToEmail [email protected] If exists, An email will be sent to notify when a new contact added via the API
notifyEmailSubject New Contact Added Subject of the notification email for new contacts
contactowner_email [email protected] Email for the user to be assigned as the contact owner on the CRM, it must be a valid email for a valid active user under the company account or will be neglected
contactowner_group group name the user group name to assigned contacts to it in a round robin
If the parameter "contactowner_email" is sent, this parameter will be neglected and "contactowner_email" will override it
email_notify_owner Possible Values (1 OR 2) if set to 1 : a notification email will be sent to the assigned owner, if set to 2(default value): no notification email will be sent to the owner
custom_field custom_field_api_name any value (Note: if auto_create_custom_fields is not set, any unkown value will be ignored)
auto_create_custom_fields 1 or 2 1: default value (ignore unkown custom fields or parameters), 2 : any unknown parameter will create a new text type custom field and add the value into it
attachments Array of Files you can submit one or more files as array attachments[], if you want to submit attachment files, Must use POST method and Multi-part
Allowed files type: (JPG, GIF, BMP, Excel, CSV, Word, Powerpoint, PDF, Text, Zipped file)
AND total files size must be less than 100M
if one of the files doesn't match this critria it will be ingonred and not saved
address_street 4806 Reppert Coal Road Street Address
address_city Bloomfield Township City Name
address_zipcode 48302 Zipcode Number
address_state FL or Florida State name or State Code
increase_number_of_times_contacted 1 or 2 1: (default value) will not increase number of times contacted counter for the contact, 2: will increase the number of times this contact has been contacted

Example:


				

Example :

https://hubbucs.com/site/api/crm_add_contact?key=12134651Gsuid7349&email=XXXXX[&Optional_parameter1=XXXXX&Optional_parameter2=XXXXX]

Response :

  1. {
  2. "message":"success",
  3. "contact_id":"Contact ID",
  4. "contact_name":"Firstname Lastname",
  5. "contact_email":"[email protected]",
  6. "company_id":"Company ID if the contact assigned to a company",
  7. "company_name":"Company Name",
  8. "owner_id":"User ID of the contact owner"
  9. }
  10. ------OR------
  11. {
  12. "error_message":"error message"
  13. }