API Service Documentation

Command: lead_set

Creates a new lead in the CRM.

Request

NameTypeRequiredExample
modeStringYinsert/update

'insert' or 'update' - if mode is 'update' then 'lead_id' or 'external_id' is required

lead_idStringN123456

Lead id to update

external_idStringNABC123456

Lead external id to update (or may also provide for insert)

full_nameStringNJohn Doe

First & Last - script will attempt to separate them

first_nameStringNJohn

First name of lead

last_nameStringNDoe

Last name of lead

companyStringNExample Company

Company of lead

addressStringN123 Test Street

Lead address

address_2StringN123rd Ave

Lead address second line

cityStringNTest City

Lead city

stateStringNTest State

Lead state

zipIntegerN97303

Lead Postal Code

countryStringNTest Country

Lead Country

latDecimalNLatitudinal street address position
lngDecimalNLongitudinal street address position
phoneStringN132-123-1234

Lead Phone Number

cellStringN321-321-4321

Lead Mobile Number

ok_to_textStringNNo

Either "Yes" or "No"

faxStringN213-213-4231

Lead Fax Number

skypeStringNjohnsmith100

Lead Skype Username

ipStringN123.123.123.123

Lead IP Address

followup_dateDateTimeN2010-01-01 12:00:00

Next follow up date for lead - auto-creates a followup event when updated

besttimeStringNMorning

Best time to follow up with lead

statusIntegerN1

Comment this to direct them to the status TE page TODO

priorityStringNWarm

How important the lead is

custom_statusIntegerN0

Integer custom_status or custom_status Text (must already exist in the custom_status table)

gmt_offsetIntegerN-1000

Lead's time zone

emailStringNexample@example.com

Lead Email address

admin_notesStringNNote text for admins

Notes viewable by admins

govt_idIntegerN100-10-1000

Lead government id

sourceStringNexample.com

Lead source

sub_idStringN10

Affiliate sub id

sub_id2StringN11

Second Affiliate sub id

birth_dateDateN1980-01-31

Lead's date of birth (YYYY-MM-DD or MM-DD)

noteStringNBla bla bla

A new note to be appended to the notes section

notesJSON Encoded StringN[{"Status":"Message","Notes":"test"},{"Status":"Email","Notes":"example@example.com"}]

Each note needs a status and the content of the notes

tagsStringNtag1,tag2,tag3

This will set the tags on the lead to exactly this list (missing tags will be removed)

ownerIDStringN12

The userID of the user by which this lead will be owned

poolStringNbillmore

A Pool Name to which this lead belongs

upload_file_nameStringNfilename.pdf

Base name of file (without path)

upload_file_contentsStringN"*#@(!...."

Full contents of the file (keep files small to avoid delays in post time)

OTHER_CUSTOM_FIELDSMiscN...

Other custom fields may be available on a per-system basis (see names of custom field names in edit mode)

match_updateIntegerN1

Perform matching (Duplicate Scrubbing) and update an existing lead (leave 'mode'='insert')

match_name_and_addressIntegerN1

Both name+address must match (each match item is ORed with the others)

match_name_and_phoneIntegerN1

Both name+phone must match (each match item is ORed with the other)

Response

NameTypeExample
statusInteger0
status_messageStringLead Creation Successful
lead_idInteger1001