Response body parameters
All webhook payloads follow a consistent top-level structure with event-specific data nested within thedata object.The event ID.
The event type that triggered the webhook (e.g.,
lead.created).ISO 8601 timestamp when the webhook event was created.
Event-specific data containing detailed information about the event. The data object for the
lead.created event contains the following parameters:Hide object parameters
Hide object parameters
Name of the tracked event (e.g.
Sign up).The click event that led to the lead (id, url, ip, continent, country, city, device, browser, os, ua, bot, qr, referer).
The referral link the lead is associated with (full link object).
Partner details. Only present when the link is a partner referral link (id, name, email, image, country, groupId, totalClicks, totalLeads, totalSales, totalSaleAmount, totalCommissions, etc.).
Optional metadata associated with the lead event.
Copy
{
"id": "evt_P343bmyae40ALQYr5HT4vRXRd",
"event": "lead.created",
"createdAt": "2024-08-30T09:53:50.343Z",
"data": {
"eventName": "Sign up",
"customer": {
"id": "oU5P0SqI8fpwx5bxw1",
"name": "John",
"email": "john@example.com",
"avatar": "https://example.com/john.jpeg"
},
"click": {
"id": "d0UtZqE0BZuBPrJS",
"url": "https://github.com/dubinc/dub",
"ip": "63.141.57.109",
"continent": "NA",
"country": "US",
"city": "San Francisco",
"device": "Desktop",
"browser": "Chrome",
"os": "Mac OS",
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36",
"bot": false,
"qr": false,
"referer": "(direct)"
},
"link": {
"id": "cm0faqkyn0001txvfwjfeq7gl",
"domain": "dub.sh",
"key": "79ys3WA",
"externalId": null,
"url": "https://github.com/dubinc/dub",
"trackConversion": true,
"archived": false,
"expiresAt": null,
"expiredUrl": null,
"password": null,
"proxy": false,
"title": null,
"description": null,
"image": null,
"video": null,
"rewrite": false,
"doIndex": false,
"ios": null,
"android": null,
"geo": null,
"publicStats": false,
"comments": null,
"shortLink": "https://dub.sh/79ys3WA",
"qrCode": "https://api.dub.co/qr?url=https://dub.sh/79ys3WA?qr=1",
"utm_source": null,
"utm_medium": null,
"utm_campaign": null,
"utm_term": null,
"utm_content": null,
"userId": "cm022rkcw0000ikt14mscg9sg",
"workspaceId": "ws_cm022sis60003ikt1syy7kfhl",
"clicks": 10,
"lastClicked": "2024-08-30T07:45:09.000Z",
"leads": 5,
"sales": 0,
"saleAmount": 0,
"createdAt": "2024-08-29T13:03:59.098Z",
"updatedAt": "2024-08-30T09:53:49.505Z",
"testCompletedAt": null,
"testStartedAt": null
},
"partner": {
"id": "pn_1JRB6678XHGBZE95R5PH5QVGS",
"name": "John Smith",
"email": "john@partner.com",
"image": "https://example.com/avatar.jpg",
"payoutsEnabledAt": null,
"country": "US",
"groupId": "grp_1K6K3HD0QE7XTX5HSVR77AK5B",
"totalClicks": 150,
"totalLeads": 25,
"totalConversions": 15,
"totalSales": 10,
"totalSaleAmount": 50000,
"totalCommissions": 5000
},
"metadata": null
}
}