6. Create a new Conversion Rule
POST {{baseUrl}}/conversions
Create one or more conversion rules with this endpoint and set conversionMethod
to CONVERSIONS_API
for streaming conversions through API.
Request Body
{"name"=>"Conversion API Segment 5", "account"=>"urn:li:sponsoredAccount:{{sponsoredaccount_id}}", "conversionMethod"=>"CONVERSIONS_API", "postClickAttributionWindowSize"=>90, "viewThroughAttributionWindowSize"=>30, "attributionType"=>"LAST_TOUCH_BY_CAMPAIGN", "type"=>"LEAD"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
LinkedIn-Version | string | ||
X-Restli-Protocol-Version | string |
RESPONSES
status: Created
{"postClickAttributionWindowSize":90,"conversionMethod":"CONVERSIONS_API","viewThroughAttributionWindowSize":30,"created":1698115671440,"type":"LEAD","enabled":true,"associatedCampaigns":[],"campaigns":[],"name":"Conversion API Segment 5","id":14488340,"lastModified":1698115671440,"attributionType":"LAST_TOUCH_BY_CAMPAIGN","urlRules":[],"account":"urn:li:sponsoredAccount:5012345"}