Leads
Import Leads
Manual import leads from raw data (probably from spreadsheet).
Endpoint:
/api/v5/entity/leads/importHTTP Method: POST
Request Parameters:
Parameter Type Required Name Description corp_idString Y Organization ID Access to users in the organization only user_idString N only if area_codeandmobileprovided, otherwise YUser ID User ID area_codeString N only if user_idprovided, otherwise YArea Code Country code mobileString N only if user_idprovided, otherwise YMobile Mobile number nameString N Name User name utm_sourceString N UTM Source Source of the lead utm_mediumString N UTM Medium Medium of the lead utm_campaignString N UTM Campaign Campaign of the lead utm_channelString N UTM Channel Channel of the lead utm_keywordString N UTM Keyword Keyword of the lead utm_termString N UTM Term Term of the lead campaignString N Campaign Campaign of the lead is_corporate_trainingBoolean N Corporate Training Is corporate training lead form1_nameString N Form1 Name First question from the form form1_valueString N Form1 Value Answer to first question of the form form2_nameString N Form2 Name Second question from the form form2_valueString N Form2 Value Answer to second question of the form form3_nameString N Form3 Name Third question from the form form3_valueString N Form3 Value Answer to third question of the form form4_nameString N Form4 Name Fourth question from the form form4_valueString N Form4 Value Answer to fourth question of the form entry_idString N Entry ID Unique entry ID page_idString N Page ID Unique page ID course_codeString N Course Code Course code bd_vidString N BD VID Business Development VID nameString N Name Name of the user associated with this lead company_nameString N Company Name Company name of the user associated with this lead work_expString N Work Experience Years of work experience of the user associated with this lead job_titleString N Job Title Job title of the user associated with this lead departmentString N Department Department of the user associated with this lead cityString N City City of the user associated with this lead owner_idsList N Owner IDs Owner IDs of the user associated with this lead oidString N Owner ID Owner ID of the user associated with this lead, only used to be compatible with previous version of example data containing oid field Response Format: JSON
Parameter Type Description lead_idString Lead ID Example Request:
curl -X POST
-H "Content-Type: application/json; charset=utf-8"
-H "Authorization : Bearer <TOKEN>"
-H "X-APP-ID: <APP_ID>"
-d '{
"corp_id": "a1bcde2bf12345678910111213141516",
"user_id": "12abcdeff123456abcd123456786c60125",
"area_code": "86",
"mobile": "1234567890",
"name": "John Doe",
"utm_source": "google",
"utm_medium": "cpc",
"utm_campaign": "brand",
"utm_channel": "search",
"utm_keyword": "openapi",
"utm_term": "openapi",
"campaign": "openapi",
"is_corporate_training": false,
"form1_name": "form1",
"form1_value": "value1",
"form2_name": "form2",
"form2_value": "value2",
"form3_name": "form3",
"form3_value": "value3",
"form4_name": "form4",
"form4_value": "value4",
"entry_id": "123456",
"page_id": "123456",
"course_code": "123456",
"bd_vid": "123456",
"name": "John Doe",
"company_name": "Company",
"work_exp": "5",
"job_title": "Engineer",
"department": "Engineering",
"city": "Shanghai",
"owner_ids": ["123456"],
"oid": "123456"
}'
- Example Response:
{
"code": 0,
"msg": "success.",
"data": {
"lead_id": "12abcdeff123456abcd123456786c60125"
}
}