9. Register for lead notifications
POST {{baseUrl}}/leadNotificationUrls
Register a lead notification webhook to receive notifications for new leads.
This example registers the webhook url, https://www.example.com, at the Ad Account level (sponsoredAccount). For any new lead submitted for campaigns that live within this Ad Account, a webhook notification will be sent.
Webhook urls can also be registered at the Campaign and Creative level.
Testing:
If you do not have a webhook url yet but would like to test the functionality, create a new HTTP / webhook source on pipedream
----------------------------------------------------------
10. Listen for lead notifications
As leads flow into the user's ad account, LinkedIn will send your webhook endpoint a notification for each lead. The notification body will contain the following content:
{
"createdTime": 1489428028784,
"accountUrn": "urn:li:sponsoredAccount:51678900",
"campaignUrn": "urn:li:sponsoredCampaign:789012",
"creativeUrn": "urn:li:sponsoredCreative:11223344",
"formUrn": "urn:li:adForm:123456",
"adFormResponseUrn": "urn:li:adFormResponse:abc123-abab-abab-abab-abc123abc123",
}
Request Body
{"key"=>{"developerApplication"=>"urn:li:developerApplication:{{application_id}}", "sponsoredEntity"=>"urn:li:sponsoredAccount:{{sponsoredaccount_id}}"}, "status"=>"ACTIVE", "url"=>"https://www.example.com"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
LinkedIn-Version | string | ||
Authorization | string | ||
X-Restli-Protocol-Version | string |
RESPONSES
status: Created