API & Webhooks

Integrate lead sources and email event tracking with LeadFlow's webhook endpoints.

Overview

LeadFlow accepts incoming data through two webhook endpoints — one for new leads from Boberdoo (or any lead provider), and one for email events from Email Bison. Both endpoints are secured and require authentication.

Boberdoo Webhook

Endpoint

POST https://api.leadflowss.com/api/v1/webhooks/boberdoo

Authentication

Include your API key in the X-Api-Key header. Each client workspace has a unique key that determines which agency the lead is routed to. Both agencies use the same webhook URL with different keys.

Content-Type: application/json
X-Api-Key: your-api-key-here

Core Contact Fields

These fields are extracted from the top level of the payload. Both Boberdoo title-case and snake_case names are accepted.

Boberdoo FieldSnake_case AltRequiredDescription
lead_idRecommendedExternal lead ID — used for deduplication
EmailemailYesLead's email address
First Namefirst_nameYesLead's first name — used in email personalization
Last Namelast_nameNoLead's last name
Daytime Phone / Cell PhonephoneNoPhone number
AddressaddressNoStreet address
CitycityNoCity
StatestateNoTwo-letter state code (e.g., FL)
ZipzipNoZIP code

Vehicle Fields (Vehicle 1 & Vehicle 2)

Prefix each field with Vehicle 1 or Vehicle 2. If any vehicle fields are present, the lead is auto-classified as insurance_type: "auto".

FieldExample KeyDescription
YearVehicle 1 YearVehicle model year
MakeVehicle 1 MakeVehicle manufacturer
ModelVehicle 1 ModelVehicle model name
Sub ModelVehicle 1 Sub ModelVehicle trim/sub-model
VinVehicle 1 VinVehicle identification number
OwnershipVehicle 1 OwnershipOwned, Leased, Financed
Primary UseVehicle 1 Primary UseCommute, Pleasure, Business
Average One Way MileageVehicle 1 Average One Way MileageAverage one-way commute miles
Annual MileageVehicle 1 Annual MileageTotal annual miles driven
ParkingVehicle 1 ParkingGarage, Driveway, Street
Average Days Per Week UsedVehicle 1 Average Days Per Week UsedDays per week the vehicle is driven
Coverage TypeVehicle 1 Coverage TypeFull Coverage, Liability Only, etc.
Desired Collision CoverageVehicle 1 Desired Collision CoverageDeductible amount
Desired Comprehensive CoverageVehicle 1 Desired Comprehensive CoverageDeductible amount
Security SystemVehicle 1 Security SystemYes or No

Driver Fields (Driver 1 & Driver 2)

Prefix each field with Driver 1 or Driver 2. These are title-case only — no snake_case alternatives.

FieldExample Key
First NameDriver 1 First Name
Last NameDriver 1 Last Name
Address / City / State / ZipDriver 1 Address
Daytime Phone / Evening Phone / Cell PhoneDriver 1 Cell Phone
EmailDriver 1 Email
BirthdateDriver 1 Birthdate
AgeDriver 1 Age
GenderDriver 1 Gender
Marital StatusDriver 1 Marital Status
Credit RatingDriver 1 Credit Rating
License StatusDriver 1 License Status
Licensed StateDriver 1 Licensed State
Age When First LicensedDriver 1 Age When First Licensed
EducationDriver 1 Education
OccupationDriver 1 Occupation
Current ResidenceDriver 1 Current Residence
Years At Current ResidenceDriver 1 Years At Current Residence
Insurance CompanyDriver 1 Insurance Company
Insured Past 30 DaysDriver 1 Insured Past 30 Days
Policy Expiration DateDriver 1 Policy Expiration Date
Insured_SinceDriver 1 Insured_Since
Current Insurance Company YearsDriver 1 Current Insurance Company Years
Continuously Insured YearsDriver 1 Continuously Insured Years
Tickets Accidents Claims Past 3 YearsDriver 1 Tickets Accidents Claims Past 3 Years
Suspended Or Revoked In The Past 5 YearsDriver 1 Suspended Or Revoked In The Past 5 Years
DUI DWI In The Past 5 YearsDriver 1 DUI DWI In The Past 5 Years
Bankruptcy In Past 5 YearsDriver 1 Bankruptcy In Past 5 Years
Additional Drivers / Additional VehiclesDriver 1 Additional Drivers
Relationship To ApplicantDriver 1 Relationship To Applicant

Incident Fields (up to 3 per Driver)

Prefix with Driver N Incident M where N is 1-2 and M is 1-3.

FieldExample Key
Incident TypeDriver 1 Incident 1 Incident Type
Approximate DateDriver 1 Incident 1 Approximate Date
DamagesDriver 1 Incident 1 Damages
At FaultDriver 1 Incident 1 At Fault
Insurance Paid AmountDriver 1 Incident 1 Insurance Paid Amount

Field Summary

GroupCount
Core contact fields10
Vehicle 1 + Vehicle 214 x 2 = 28
Driver 1 + Driver 232 x 2 = 64
Incidents (3 per driver x 2 drivers)5 x 3 x 2 = 30
Optional (insurance_type, source)2
Total134

Full Example Payload

{
  "lead_id": "12345",
  "First Name": "Sarah",
  "Last Name": "Martinez",
  "Email": "sarah.martinez@example.com",
  "Cell Phone": "9545551234",
  "Address": "1234 Coral Way",
  "City": "Coral Springs",
  "State": "FL",
  "Zip": "33065",

  "Vehicle 1 Year": "2024",
  "Vehicle 1 Make": "Honda",
  "Vehicle 1 Model": "Civic",
  "Vehicle 1 Ownership": "Owned",
  "Vehicle 1 Coverage Type": "Full Coverage",
  "Vehicle 1 Annual Mileage": "12000",

  "Driver 1 First Name": "Sarah",
  "Driver 1 Last Name": "Martinez",
  "Driver 1 Age": "28",
  "Driver 1 Gender": "Female",
  "Driver 1 Marital Status": "Single",
  "Driver 1 Credit Rating": "Good",
  "Driver 1 License Status": "Active",
  "Driver 1 Licensed State": "FL",
  "Driver 1 Insurance Company": "GEICO",
  "Driver 1 Insured Past 30 Days": "Yes",
  "Driver 1 Tickets Accidents Claims Past 3 Years": "0"
}

Response

HTTP CodeBodyMeaning
200{"status": "received", "client": "greg-blanchard"}Lead accepted and queued for AI processing
200{"status": "duplicate", "client": "greg-blanchard"}Lead already processed (deduped by lead_id)
401{"detail": "Invalid API key"}API key not found or client inactive
429{"detail": "Rate limit exceeded"}Too many requests — retry after Retry-After header

cURL Example

curl -X POST https://api.leadflowss.com/api/v1/webhooks/boberdoo \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY_HERE" \
  -d '{
    "lead_id": "12345",
    "First Name": "John",
    "Last Name": "Smith",
    "Email": "john@example.com",
    "Cell Phone": "5615551234",
    "City": "Palm Beach Gardens",
    "State": "FL",
    "Zip": "33410",
    "Vehicle 1 Year": "2024",
    "Vehicle 1 Make": "Toyota",
    "Vehicle 1 Model": "Camry",
    "Driver 1 Age": "36",
    "Driver 1 Insurance Company": "State Farm"
  }'

What Happens After

  1. Lead is deduplicated by lead_id and stored
  2. AI drafts a personalized email using the lead's vehicle, location, and insurance data
  3. Email is sent via Email Bison within seconds
  4. Lead appears in your dashboard under Conversations
  5. When the lead replies, the AI classifies the intent (interested, question, not interested)
  6. Interested leads are escalated — agent is CC'd on a handoff email

Email Event Webhook (Bison)

Endpoint

POST https://api.leadflowss.com/api/v1/webhooks/bison

Tracked Events

Email Bison sends event notifications for the following actions:

EventDescriptionDashboard Effect
replyLead replied to an emailNew message in conversation thread + AI classification
deliveredEmail was delivered successfullyDelivery confirmation in email events
bouncedEmail bounced (invalid address)Lead marked, bounce rate updated
openedLead opened the emailOpen event tracked in analytics
clickedLead clicked a link in the emailClick event tracked in analytics
unsubscribedLead opted outLead suppressed — no further emails sent
The Bison webhook is configured by your LeadFlow administrator. No action is needed from clients — event tracking is automatic once set up.

Rate Limits

EndpointLimitWindow
Boberdoo webhook120 requestsPer 60 seconds per IP
Bison webhook120 requestsPer 60 seconds per IP

If you exceed the rate limit, you'll receive a 429 Too Many Requests response with a Retry-After header indicating when you can retry.