CreateContact Function Definition
The CreateContact function is used to add a new contact or company to your CRM. You should probably familiarize yourself with the difference between contacts and companies before using this function, because it might make a little more sense that way.
When calling this this function, the Function parameter sent to the API should be set to CreateContact.
If successful, this function will return an array with a ContactId and/or a CompanyId (depending on what types of records you enter).
FullName - This is the contact's full name. If you use this parameter, don't use the next five name fields (they are redundant)
Salutation - The prefix of the contact's name (Mr, Dr, Mrs, etc.)
FirstName - The contact's first name. If you are using these name parts insead of the FullName, you must either fill out a FirstName or a LastName
MiddleName - The contact's middle name
LastName - The contact's last name
Suffix - The contact's suffix (Jr, Sr, etc)
CompanyName - The name of the company. If you have a contact name and a company name, we'll create both records. If you only have a company name, we'll only create that record.
CompanyId - You can use this INSTEAD OF the CompanyName. For example, if you use the API to create a company, we'll return the CompanyId. You can then use that CompanyId to create a new contact and link it to the company. *Note: CompanyId should be treated like a string, NOT an integer or any other number type.*
Title - The contact's title (CEO, Sales Rep, etc.). Don't use this if you're only creating a company.
Industry - The company's industry. Only use this if you are creating a solo company (no contact).
NumEmployees - The number of employees at the company. Only use this if you are creating a solo company (no contact).
BackgroundInfo - A long text field where you can store any additional data. Line break characters (\n) work in this field.
Email - an array of email addresses.
Phone - an array of phone numbers.
Address - an array of addresses.
Website - an array of websites.
Birthday - The contact's birthday. You can use any format you want, but we read "xx/xx/xxxx" as "mm/dd/yyyy" (the American format) so if you prefer the European format you should use something different like "yyyy-mm-dd" or "October 31st, 1981"
CustomFields - An array of any additional data you want to enter. The values in the array should follow the format FIELD_NAME=>VALUE.
AssignedTo - (Optional) the UserId of who the contact is assigned to. Here are instructions for finding the correct UserId.
This code shows how to format the parameters accepted by the CreateContact function using PHP, and how to pass them to the API.