351c1f004617
Report a conversion
Report a conversion — a purchase, signup, or custom event that happened on your site after someone clicked a Linkly link.
Pass the linkly_cid your landing page captured to attribute the conversion to the originating link. A missing or unrecognised linkly_cid is not an error: the conversion is recorded unattributed rather than dropped.
Leads and sales
Set event_type to lead for signups, trials and demo requests, sale when money changes hands, or custom for anything else. The type drives the clicks → leads → sales funnel.
Send external_id — your own customer identifier — on every event. A lead reported with both an linkly_cid and an external_id ties that customer to the link, and later events for the same external_id inherit the attribution automatically. This is what makes server-side sales attributable: the purchase usually arrives from a billing webhook that never saw the linkly_cid. Attribution is first-touch, so a customer who later arrives via a different link keeps the credit on their original one.
Supply event_id to make the call idempotent. Reporting the same event_id twice returns 200 with the original conversion instead of creating a duplicate, so a retrying client is safe.
Request body
Example request
{
"amount_cents": 4999,
"country": "US",
"currency": "USD",
"event_id": "shopify-1234",
"event_name": "purchase",
"event_type": "sale",
"external_id": "customer-42",
"linkly_cid": "2on1Y.01KYPGEEPJSPR3S564QRBDGA1W",
"metadata": {
"sku": "ABC-123"
},
"occurred_at": "2026-07-29T10:30:00Z",
"visitor_ip": "203.0.113.42"
}Response
Already recorded — the existing conversion for this event_id
Example response
{
"amount_cents": 4999,
"click_id": "01KYPGEEPJSPR3S564QRBDGA1W",
"country": "US",
"currency": "USD",
"event_id": "shopify-1234",
"event_name": "purchase",
"event_type": "sale",
"external_id": "customer-42",
"id": "01KYPH20SEJY4HQSCPMWW60QE0",
"ip_source": "visitor",
"link_id": 41657524,
"source": "api"
}