The /v1/track/* endpoints let your backend report events without relying on
the browser snippet. They require a workspace key with the track scope.
Click
ref is required; it identifies the referral link.
curl https://go.affixo.dev/v1/track/click \
-H "Authorization: Bearer sa_live_your_key" \
-H "Content-Type: application/json" \
-d '{ "ref": "jane", "visitor_id": "v_abc" }'
Returns the resolved visitor_id plus the identity match_method /
match_confidence. Persist visitor_id so later conversions attribute cleanly.
Lead & Sale
Report a signup (lead) or purchase (sale). Provide any identity signal you
have — visitor_id, fingerprint, ref, or manual_code — and Affixo
attributes the event using your workspace’s precedence rules.
curl https://go.affixo.dev/v1/track/sale \
-H "Authorization: Bearer sa_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"visitor_id": "v_abc",
"external_id": "order_1234",
"amount": 99.00,
"currency": "usd"
}'
sale and lead are idempotent on external_id — safe to retry. When no
affiliate can be attributed you get { "ok": true, "attributed": false }.
Refund
Reverse a prior conversion by its external_id.
curl https://go.affixo.dev/v1/track/refund \
-H "Authorization: Bearer sa_live_your_key" \
-H "Content-Type: application/json" \
-d '{ "external_id": "order_1234" }'
See the API Reference for full request/response schemas.