Logo
LinkedIn Marketing Solutions Versioned APIs API Documentation

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.

 

Body PARAM

Key Datatype Required Description 



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" }



Curl
curl -X POST 'baseUrl/conversions' -H 'LinkedIn-Version: insert_version' -H 'X-Restli-Protocol-Version: 2.0.0' -d '{"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"}'

ENDPOINTS