This document describes both outbound webhooks (sent by LeadSource to your systems) and inbound webhooks (received by LeadSource from your systems).
Outbound webhooks notify your systems when events occur in LeadSource. Configure webhook endpoints via the dashboard.
| Event | Description |
|---|---|
LEAD_WON |
Fired when a lead is matched to one of your campaigns |
TEST |
Sent when testing a webhook endpoint |
{
"event": "LEAD_WON",
"lead": {
"hashid": "abc123",
"email": "[email protected]",
"phone": "5551234567",
"firstName": "John",
"lastName": "Doe",
"address": "123 Main St",
"city": "San Francisco",
"state": "CA",
"zipCode": "94102",
"service": "HVAC Repair",
"priceInCents": 5000,
"priceInDollars": 50,
"data": { "...": "miscellaneous data provided with the lead" }
},
"campaign": {
"hashid": "xyz789",
"name": "SF Bay Area HVAC"
},
"account": {
"hashid": "123abc"
},
"timestamp": "2024-01-15T10:30:00.000Z"
}
lead object| Field | Type | Description |
|---|---|---|
hashid |
string | Unique lead identifier |
email |
string | Lead's email address |
phone |
string | Lead's phone (normalized, digits only) |
firstName |
string | First name |
lastName |
string | Last name |
address |
string | Street address |
city |
string | City |
state |
string | State (2-letter code) |
zipCode |
string | ZIP code |
service |
string | Specific service requested |
priceInCents |
number | Price paid for this lead in cents |
priceInDollars |
number | Price paid for this lead in dollars |
data |
object | Miscellaneous data provided with the lead |
campaign object| Field | Type | Description |
|---|---|---|
hashid |
string | Campaign identifier |
name |
string | Campaign name |
account object| Field | Type | Description |
|---|---|---|
hashid |
string | Account identifier (the LeadSource account that owns the receiving campaign) |
Test payloads have the same structure as LEAD_WON but with event: "TEST" and sample data. Use this to verify your endpoint is receiving webhooks correctly.
Failed webhook deliveries are retried with exponential backoff. Webhooks are considered failed if:
Inbound webhooks allow your systems to send data back to LeadSource (e.g., conversion tracking).
POST /webhooks/:accountHashid/:token
accountHashid: Your account identifiertoken: Secret token for authentication (generated when creating an inbound webhook endpoint)Requests are authenticated via the URL token. No additional headers required.
lead_update (default)Report lead status changes and deal value back to LeadSource.
Request:
{
"event": "lead_update",
"externalLeadId": "crm_id_123",
"email": "[email protected]",
"phone": "5551234567",
"status": "CLOSED_WON",
"leadValue": 150.00
}
| Field | Type | Required | Description |
|---|---|---|---|
event |
string | No | Event type. Defaults to "lead_update" if omitted. "lead_update" is currently the only supported value |
externalLeadId |
string | One of externalLeadId/email/phone | Your system's identifier for the lead (e.g. CRM contact ID). Highest-priority matcher |
email |
string | One of externalLeadId/email/phone | Lead's email for matching |
phone |
string | One of externalLeadId/email/phone | Lead's phone for matching |
status |
string | No | Lead status (see values below) |
leadValue |
number | No | Deal value in dollars |
leadValueCents |
number | No | Deal value in cents. If both leadValue and leadValueCents are provided, leadValueCents is used |
| Status | Description |
|---|---|
OPEN |
Lead created, no activity yet |
CONTACTED |
Lead has been contacted |
APPOINTMENT_BOOKED |
Appointment scheduled with lead |
QUOTED |
Quote or proposal sent |
CLOSED_WON |
Deal closed successfully |
CLOSED_LOST |
Deal lost |
UNKNOWN |
Status unknown (default if value is missing or unrecognized) |
Status matching is case-insensitive, and common variants are accepted (e.g. closed-won, proposal_sent, booked). Unrecognized values are stored as UNKNOWN.
Response:
{
"received": true,
"matched": true
}
| Field | Type | Description |
|---|---|---|
received |
boolean | Always true for valid requests |
matched |
boolean | Whether a matching lead was found |
error |
string | Error message if request was invalid |
Leads are matched in priority order: externalLeadId → email → phone. Only leads belonging to campaigns owned by the authenticated account are considered. The most recently created matching lead is updated.
Note: Only one inbound endpoint per account.
Create:
Edit/Delete:
Dispatch History: View past webhook deliveries with payload details on the webhook detail page.