lead.captured.v1
Fired when a new lead is captured from any source — VSL forms, quiz completions, inbound leads, or other channels.
Event Name
lead.captured.v1Schema
| Field | Type | Required | Description |
|---|---|---|---|
eventId | uuid | Yes | Unique event identifier |
occurredAt | datetime | Yes | ISO 8601 timestamp |
brandId | uuid | Yes | Brand that captured the lead |
email | email | Yes | Lead’s email address |
source | enum | Yes | Capture source: vsl_form, quiz_completion, inbound_lead, other |
attribution | object | Yes | Attribution data |
attribution.utm_source | string | No | UTM source parameter |
attribution.utm_medium | string | No | UTM medium parameter |
attribution.utm_campaign | string | No | UTM campaign parameter |
attribution.irclickid | string | No | Impact Radius click ID |
personId | uuid | null | No | Resolved person ID (null if not yet resolved) |
Example Payload
{
"eventId": "550e8400-e29b-41d4-a716-446655440000",
"occurredAt": "2026-05-19T14:30:00Z",
"brandId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"email": "jane@example.com",
"source": "vsl_form",
"attribution": {
"utm_source": "google",
"utm_medium": "cpc",
"utm_campaign": "bpc157-launch"
},
"personId": null
}Usage
import { validateEvent } from '@loop/contracts';
const payload = {
eventId: crypto.randomUUID(),
occurredAt: new Date().toISOString(),
brandId: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
email: 'jane@example.com',
source: 'vsl_form',
attribution: {
utm_source: 'google',
utm_medium: 'cpc',
utm_campaign: 'bpc157-launch',
},
personId: null,
};
const result = validateEvent('lead.captured.v1', payload);
if (result.success) {
await fetch('https://comms.loop.health/api/events', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${API_KEY}`,
},
body: JSON.stringify({
event: 'lead.captured.v1',
payload: result.data,
}),
});
} else {
console.error('Validation failed:', result.error.issues);
}