Signups
Record Lead Signup
Convert a previously tracked click into a lead. Server-side equivalent of the pixel.js Affonso.signup() call.
POST
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:
- Track the click with
POST /v1/clicks— store the returnedidas yourclickId. - Once the visitor signs up in your application, call
POST /v1/signupswith thatclickIdplus 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.
Body Parameters
The click ID returned by
POST /v1/clicks. Must belong to your team.The lead’s email address. Either
email or external_user_id must be provided. Silently ignored when the program has email tracking disabled.Your internal identifier for the lead (e.g. database user ID). Either
email or external_user_id must be provided.The lead’s display name. Maximum 255 characters. Silently ignored when the program has name tracking disabled.
Response
true on success. Returns false only on validation, auth, or not-found errors.The referral object after conversion.
Status codes
| 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. |
Fraud checks
The same fraud checks that run for browser-side signups (self-referral, disposable email, paid traffic) also apply here. If any check is configured in BLOCK mode and rejects the signup:- The referral status is set to
rejectedinstead oflead. - The
referral.leadwebhook is not emitted. - No lead-incentive commission is created.
- The endpoint still returns
201 Createdwith the rejected referral object — inspectdata.statusto detect blocks.
Webhooks fired
| 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). |
Related endpoints
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.
