Convert a previously tracked click into a lead. Server-side equivalent of the pixel.js Affonso.signup() call.
Use this endpoint when you want to record a lead signup from your own backend instead of relying on the browser pixel. The typical flow is:Documentation Index
Fetch the complete documentation index at: https://docs.affonso.io/llms.txt
Use this file to discover all available pages before exploring further.
POST /v1/clicks — store the returned id as your clickId.POST /v1/signups with that clickId plus their email and/or your internal user ID.clickId returns the existing referral without creating duplicates.
If the affiliate’s program has a lead incentive configured, this call also creates the commission transaction and fires the transaction.created webhook in addition to referral.lead.
POST /v1/clicks. Must belong to your team.email or external_user_id must be provided. Silently ignored when the program has email tracking disabled.email or external_user_id must be provided.true on success. Returns false only on validation, auth, or not-found errors.| Code | Meaning |
|---|---|
201 Created | Click successfully converted to a lead. |
200 OK | Idempotent re-call — the click was already converted. Returns the existing referral. |
400 Bad Request | Validation error (missing click_id, neither email nor external_user_id provided, invalid email format). |
401 Unauthorized | Missing or invalid API key. |
404 Not Found | The click_id does not exist or belongs to a different team. |
429 Too Many Requests | Per-API-key rate limit exceeded. |
rejected instead of lead.referral.lead webhook is not emitted.201 Created with the rejected referral object — inspect data.status to detect blocks.| Event | When |
|---|---|
referral.lead | Conversion succeeded and was not blocked by fraud checks. |
transaction.created | Conversion succeeded, was not blocked, and the program has a lead incentive configured for this affiliate (via group incentive or override). |
POST /v1/clicks — track the click that you’ll later convert.POST /v1/referrals — alternative endpoint when you want to skip the click stage and record a referral directly.