Generic Leads - B2B API


Name Value
/api/v1/generic_lead
LEAD_WEBHOOK_KEY: your_api_token_value

Parameters

Name Type Required Example Description
inquiring_for string Yes team When this field value is 'team' we change the flow to use b2b ones. So 'team' should be always
company string Yes Emeritus Company name
number_of_participans integer Yes 5 2 = 1-2; 5 = 3-5; 11 = 6-11; 12 = 12+
course_code string Yes KLG-DMS Used to fetch the program
agree boolean Yes 1 0 = False; 1 = True
country string Yes UY Use 2 digits ISO code
last_name string Yes Ferreira
email string Yes juan@email.com Should be a valid email address
phone string Yes +5555555555
utm_source string Yes vendorname Will represent the vendor name in one word (ex: educationdynamics)
first_name string No Juan
work_experience string No 5-10 years
job_title string No Developer
batch_name string No B-1234 DEPRECATED, used to fetch the program
utm_campaign string No B-1234_some_utm_campaing DEPRECATED
utm_content string No Can be used for optional data from vendors
utm_placement string No

Payload

      
{
  "inquiring_for": "team",
  "company": "Emeritus",
  "number_of_participans": "5",
  "course_code": "KLG-DMS",
  "agree": 1,
  "country": "UY",
  "first_name": "Juan",
  "last_name": "Ferreira",
  "email": "juan@email.com",
  "phone": "+5555555555",
  "utm_source": "vendorname",
  "work_experience": "5-10 years",
  "job_title": "Developer",
  "batch_name": "B-1234",
  "utm_campaign": "B-1234_some_utm_campaing",
  "utm_content": "",
  "utm_placement": ""
}
      
    

Response

200

      
{
  "lead": "94ab3b43-3209-4534-8afe-52070644866f"
}
      
    

422

      
{
  "title": "Could not save the lead",
  "errors": {
    "full_name": [
      "required"
    ]
  }
}
      
    

      
{
  "title": "Could not save the lead",
  "errors": {
    "number_of_participants": [
      "required",
      "is not included in the list"
    ]
  }
}
      
    

      
{
  "title": "Could not save the lead",
  "errors": {
    "name": [
      "required"
    ],
    "company_name": [
      "required"
    ]
  }
}
      
    

401

      
{
  "error": "This is not an authorized request"
}