Skip to main content

Referrals API

The referral program lets affiliates earn recurring commissions by inviting new users to Affilync. Referred affiliates generate 10% commission for 12 months.

Get Program Info

curl https://api.affilync.com/api/affiliate/referrals \
-H "Authorization: Bearer YOUR_TOKEN"

Response (200):

{
"referral_code": "REF_A1B2C3",
"referral_link": "https://app.affilync.com/signup?ref=REF_A1B2C3",
"commission_rate": 10.0,
"bonus_tiers": [
{ "referrals_needed": 5, "bonus": 50 },
{ "referrals_needed": 10, "bonus": 150 },
{ "referrals_needed": 25, "bonus": 500 },
{ "referrals_needed": 50, "bonus": 1500 },
{ "referrals_needed": 100, "bonus": 5000 }
],
"terms_and_conditions": "Earn 10% commission on all sales generated by your referred affiliates for the first 12 months."
}

Get Referral Stats

curl https://api.affilync.com/api/affiliate/referrals/stats \
-H "Authorization: Bearer YOUR_TOKEN"

Response (200):

{
"total_referrals": 24,
"active_referrals": 18,
"pending_referrals": 6,
"total_earnings": 1247.50,
"lifetime_earnings": 1247.50,
"conversion_rate": 75.0,
"average_earning_per_referral": 69.30
}

List Referrals

curl "https://api.affilync.com/api/affiliate/referrals/list?status=active&page=1&per_page=20" \
-H "Authorization: Bearer YOUR_TOKEN"

Query Parameters:

ParameterTypeDefaultDescription
statusstringFilter: active, pending, inactive
pageint1Page number
per_pageint10Results per page (max 100)

Response (200):

[
{
"id": "ref_abc123",
"referral_code": "REF_A1B2C3",
"referred_email": "[email protected]",
"referred_name": "Jane D.",
"status": "active",
"signup_date": "2026-02-15T10:30:00Z",
"earnings_generated": 450.00,
"commission_earned": 45.00,
"created_at": "2026-02-15T10:30:00Z"
}
]

Send Invitation

curl -X POST https://api.affilync.com/api/affiliate/referrals/invite \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"name": "John",
"message": "Join Affilync and start earning!"
}'

Response (200):

{
"data": {
"invitation_id": "inv_xyz789",
"email": "[email protected]",
"referral_link": "https://app.affilync.com/signup?ref=REF_A1B2C3",
"message": "Invitation sent successfully"
}
}

Leaderboard

curl "https://api.affilync.com/api/affiliate/referrals/leaderboard?period=month&limit=10" \
-H "Authorization: Bearer YOUR_TOKEN"

Query Parameters:

ParameterTypeDefaultDescription
periodstringmonthweek, month, year, all-time
limitint10Max results (1-100)

Response (200):

[
{
"rank": 1,
"affiliate_name": "Sar***",
"total_referrals": 47,
"active_referrals": 42,
"earnings_generated": 12500.00,
"commission_earned": 1250.00,
"is_current_user": false
}
]
Public Referral Link

Share https://app.affilync.com/ref/{YOUR_CODE} — this sets a 60-day cookie and redirects to signup. No authentication required.

Bonus Progress

curl https://api.affilync.com/api/affiliate/referrals/bonus-progress \
-H "Authorization: Bearer YOUR_TOKEN"

Response (200):

{
"data": {
"current_referrals": 18,
"next_bonus": { "referrals_needed": 25, "bonus": 500 },
"bonus_tiers": [
{ "referrals_needed": 5, "bonus": 50, "reached": true },
{ "referrals_needed": 10, "bonus": 150, "reached": true },
{ "referrals_needed": 25, "bonus": 500, "reached": false },
{ "referrals_needed": 50, "bonus": 1500, "reached": false },
{ "referrals_needed": 100, "bonus": 5000, "reached": false }
],
"total_bonuses_earned": 200
}
}