Developers
Kollab API
Everything a brand needs to track clicks and report conversions back to Kollab. All endpoints live under https://www.trykollab.com/api/public, accept and return JSON, and allow cross-origin requests.
Overview
The flow has three steps:
- A partner shares their tracking link. A visitor clicks it.
- Kollab records the click, sets a first-party attribution cookie and redirects to your landing page with
refandkidparameters. - When the visitor converts (lead, sale, booked call…), you tell Kollab — from your server or with the pixel. Kollab credits the partner and creates a pending commission.
Your per-campaign snippets with real IDs are in the dashboard under Admin → Tracking.
Tracking links
GET https://www.trykollab.com/api/public/track/{tracking_code}Each approved partner gets a unique tracking_code per campaign. The link only works once an admin approves the partner and the campaign is active.
On success Kollab responds 302 to your destination URL with two parameters added:
https://yourbrand.com/landing?ref={tracking_code}&kid={click_id}Store kid (click ID) with the visitor's session or order — it's the most reliable way to attribute the conversion later.
Record a conversion (server-to-server)
POST https://www.trykollab.com/api/public/convert
Content-Type: application/json| Field | Type | Notes |
|---|---|---|
| click_id | uuid | The kid value from the landing URL. Preferred. |
| tracking_code | string | Fallback — attributes to the code's most recent click. |
| campaign_id | uuid | Enables cookie attribution when called from the browser. |
| order_value | number | Sale amount. Required for Rev Share payouts. |
| currency | string(3) | e.g. USD. Defaults to the campaign currency. |
| external_ref | string | Your order or lead ID, for reconciliation. |
At least one of click_id, tracking_code, or campaign_id + attribution cookie is required.
curl -X POST https://www.trykollab.com/api/public/convert \
-H "Content-Type: application/json" \
-d '{
"click_id": "8d1c2f7e-1b2a-4c3d-9e8f-0a1b2c3d4e5f",
"order_value": 149.00,
"currency": "USD",
"external_ref": "ORDER-10045"
}'Response:
{
"ok": true,
"conversion_id": "c7a1…",
"fraud_score": 0,
"flagged": false,
"commission_amount": 29.80
}Browser pixel
Drop this on your thank-you page. It sends the stored click ID (or the attribution cookie) to Kollab.
<script>
(function () {
var p = new URLSearchParams(location.search);
var kid = p.get("kid") || localStorage.getItem("kollab_kid");
fetch("https://www.trykollab.com/api/public/convert", {
method: "POST",
credentials: "include",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
click_id: kid || undefined,
campaign_id: "YOUR_CAMPAIGN_ID",
order_value: 0,
external_ref: "ORDER_OR_LEAD_ID"
})
});
})();
</script>On your landing page, save the click ID so it survives navigation:
<script>
var kid = new URLSearchParams(location.search).get("kid");
if (kid) localStorage.setItem("kollab_kid", kid);
</script>Attribution rules
- Last click wins. The attribution window defaults to 30 days and is set per campaign.
- Conversions after the window return
410and are not credited. - Every conversion is fraud-scored automatically; suspicious ones are flagged for admin review.
Commissions
Each conversion creates a pending commission based on the campaign's model:
- CPL / CPA / CPS / Booked call — the campaign's fixed payout per acquisition.
- Rev Share — payout % ×
order_value.
Admins approve or reject commissions in the review queue before payout.
Errors
| 400 | Invalid JSON or invalid fields (details included). |
| 404 | Unknown click, inactive link, or campaign not available. |
| 410 | Attribution window expired. |
| 422 | No attribution found — send click_id, tracking_code or the cookie. |
| 500 | Server error — safe to retry with the same external_ref. |
Health check
GET https://www.trykollab.com/api/public/health
{ "status": "operational", "components": { "api": "operational", "database": "operational" } }See live results on the status page. Questions? Email hello@trykollab.com.
