Skip to main content

Leads

Import Leads

Manual import leads from raw data (probably from spreadsheet).

  • Endpoint: /api/v5/entity/leads/import

  • HTTP Method: POST

  • Request Parameters:

    ParameterTypeRequiredNameDescription
    corp_idStringYOrganization IDAccess to users in the organization only
    user_idStringN only if area_code and mobile provided, otherwise YUser IDUser ID
    area_codeStringN only if user_id provided, otherwise YArea CodeCountry code
    mobileStringN only if user_id provided, otherwise YMobileMobile number
    nameStringNNameUser name
    utm_sourceStringNUTM SourceSource of the lead
    utm_mediumStringNUTM MediumMedium of the lead
    utm_campaignStringNUTM CampaignCampaign of the lead
    utm_channelStringNUTM ChannelChannel of the lead
    utm_keywordStringNUTM KeywordKeyword of the lead
    utm_termStringNUTM TermTerm of the lead
    campaignStringNCampaignCampaign of the lead
    is_corporate_trainingBooleanNCorporate TrainingIs corporate training lead
    form1_nameStringNForm1 NameFirst question from the form
    form1_valueStringNForm1 ValueAnswer to first question of the form
    form2_nameStringNForm2 NameSecond question from the form
    form2_valueStringNForm2 ValueAnswer to second question of the form
    form3_nameStringNForm3 NameThird question from the form
    form3_valueStringNForm3 ValueAnswer to third question of the form
    form4_nameStringNForm4 NameFourth question from the form
    form4_valueStringNForm4 ValueAnswer to fourth question of the form
    entry_idStringNEntry IDUnique entry ID
    page_idStringNPage IDUnique page ID
    course_codeStringNCourse CodeCourse code
    bd_vidStringNBD VIDBusiness Development VID
    nameStringNNameName of the user associated with this lead
    company_nameStringNCompany NameCompany name of the user associated with this lead
    work_expStringNWork ExperienceYears of work experience of the user associated with this lead
    job_titleStringNJob TitleJob title of the user associated with this lead
    departmentStringNDepartmentDepartment of the user associated with this lead
    cityStringNCityCity of the user associated with this lead
    owner_idsListNOwner IDsOwner IDs of the user associated with this lead
    oidStringNOwner IDOwner 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

    ParameterTypeDescription
    lead_idStringLead 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"
}
}