Create an affiliate

Create an affiliate

Creates (or updates) an affiliate for your program. If the program requires manual review, the affiliate is created as not_applied; otherwise they are instantly approved.

Email verification gates attribution. A brand-new affiliate receives a verification email (link expires after 1 hour). Until the address is verified, the affiliate has no referral code, no referral link, and no discount code — verification assigns the referral code immediately, and you can then create a discount code. Use Resend the verification email if the link expired.

Body

FieldTypeRequiredNotes
namestringyes1–100 characters.
emailstringyesValid email; lowercased.
imagestring (URL)noAvatar image.
acceptedAffiliateLegalVersionstringyesLegal terms version the affiliate accepted.
acceptedAffiliateLegalLanguagestringyes"en" or "fr".
{
  "name": "Jane Doe",
  "email": "[email protected]",
  "image": "https://example.com/jane.png",
  "acceptedAffiliateLegalVersion": "2026-v1",
  "acceptedAffiliateLegalLanguage": "en"
}

Fetching the legal terms version

acceptedAffiliateLegalVersion must exactly match the platform's current affiliate terms version — anything else is rejected. Fetch the current value with:

GET /api/legal-version/affiliate
{ "version": "2026-v1" }

No API key is required. Use the returned version verbatim as acceptedAffiliateLegalVersion, and have the affiliate accept that same version of the terms before (or when) you create them — the value is enforced again on every affiliate action.

Responses

201 — created (or 200 when the email already exists and the profile was updated). Returns the full affiliate profile:

{
  "name": "Jane Doe",
  "email": "[email protected]",
  "avatarSrc": "https://example.com/jane.png",
  "isEmailVerified": false,
  "affiliateId": "abc123",
  "conversion_rate": 0,
  "conversions": 0,
  "clicks": 0,
  "revenue": [],
  "primarySource": null,
  "application": {
    "status": "approved",
    "hasApplicationMessage": false,
    "fullName": null,
    "email": null,
    "promotionMethod": null,
    "description": null
  },
  "traffic": { "allTime": { "sources": [], "percentages": [] }, "today": { "sources": [], "percentages": [] } }
}

Field notes

FieldValuesMeaning
namestringThe affiliate's name; "Unknown Affiliate" when unset.
emailstringThe account's email; null when the account has none.
avatarSrcstringThe affiliate's avatar, or the platform default avatar when unset.
isEmailVerifiedbooleanfalse for a brand-new affiliate — it flips to true when the emailed verification link is consumed. Attribution (referral code) unlocks at that point.
affiliateIdstringThe affiliate's permanent Rezfiliate id. Store it — every affiliate action (discount code, dashboard, analytics, payouts, apply, Stripe onboarding, resend verification) addresses the affiliate by this id, and there is no lookup-by-email endpoint.
clicksnumberTotal tracked clicks; always 0 at creation.
revenue{ amount, currency }[]One entry per currency the affiliate has earned; always [] at creation. amount is in the currency's smallest unit.
application.statusnot_applied | approvednot_applied when the program requires manual review (they apply later), approved when affiliates join automatically. Later values: pending after they apply, declined if rejected.
application.hasApplicationMessagebooleantrue once any application exists.
application.fullName / .email / .promotionMethod / .descriptionstring | nullThe structured application details; all null until the affiliate applies. promotionMethod is one of website_blog, youtube, tiktok, instagram, x_twitter, newsletter_email, paid_advertising, community_forum.
conversion_ratenumberConversions per 10,000 clicks — 0 at creation. Scale plan only; omitted otherwise.
conversionsnumberTotal attributed conversions — 0 at creation. Scale plan only; omitted otherwise.
primarySourcestring | nullTop traffic source; null at creation. Scale plan only; omitted otherwise.
trafficobject | nullZero-filled all-time/today traffic at creation. Scale plan only; null otherwise.

On plans without Scale, conversion_rate, conversions and primarySource are omitted and traffic is null.

Store the affiliateId. It is the permanent identifier for every affiliate-scoped operation in the API — creating their discount code, reading their dashboard, analytics and payouts, submitting/updating their application, Stripe onboarding, and resending their verification email all address the affiliate by this id. There is no lookup-by-email endpoint, so persist it alongside your own user record when you create (or first fetch) the affiliate.

Errors — all { "error": "<message>" }:

Statuserror values
400A field-specific validation message (name length, email format, legal language, …) · Please use a trusted email address. (disposable or unresolvable email domain)
403This affiliate program is not online. · The affiliate must accept the current affiliate legal terms. · This email already has an account. Verify the email address, then retry affiliate creation. (an unverified account holds that email — a verification email was sent, valid 1 hour)
410This program has been terminated.
503Email verification is required, but the verification email could not be sent. Please retry. · The affiliate was created, but the verification email could not be sent. Retry this request to send another link.