Skip to content

Referral System

Track user referrals and invitations.

Create Referral

curl -X POST http://localhost:8000/api/sso/v1/referrals \
  -H "Authorization: Bearer TOKEN" \
  -d '{
    "code": "FRIEND2025",
    "max_uses": 10,
    "expires_at": "2025-12-31T23:59:59Z"
  }'

List Referrals

curl -X GET http://localhost:8000/api/sso/v1/referrals \
  -H "Authorization: Bearer TOKEN"

Use Referral

During registration:

curl -X POST http://localhost:8000/api/sso/v1/auth/register \
  -d '{
    "identifier": "[email protected]",
    "password": "SecurePass123!",
    "referral_code": "FRIEND2025"
  }'

Referral Analytics

curl -X GET http://localhost:8000/api/sso/v1/referrals/FRIEND2025/stats \
  -H "Authorization: Bearer TOKEN"