Skip to content

Referral

The referral system requires Privy authentication. Include a Privy Bearer token in the Authorization header. The verified wallet address must match the :address parameter.

Authorization: Bearer <privy_token>

Get Referral Code

GET /referral/:address

Gets or creates a referral code for the authenticated user.

bash
curl https://mainnet.api.ryze.pro/api/referral/0xYourAddress \
  -H "Authorization: Bearer <privy_token>"

Response 200

json
{
  "address": "0xyouraddress",
  "referralCode": "ABC123"
}
FieldTypeDescription
referralCodestring6-character alphanumeric code

Errors

CodeReason
403Authenticated wallet doesn't match :address
500Code generation failed

Register Referral

POST /referral/register

Register that you were referred by someone.

bash
curl -X POST https://mainnet.api.ryze.pro/api/referral/register \
  -H "Authorization: Bearer <privy_token>" \
  -H "Content-Type: application/json" \
  -d '{ "referralCode": "ABC123" }'

Request Body

FieldTypeRequiredDescription
referralCodestringYesReferrer's code (case-insensitive)

Response 200

json
{
  "success": true,
  "referrer": "0xreferreraddress"
}

If already referred:

json
{
  "success": true,
  "alreadyReferred": true,
  "referrer": "0xreferreraddress"
}

Errors

CodeReason
400Missing code, invalid code format, or self-referral
404Referral code doesn't exist

Referred Users

GET /referral/:address/referred

Lists users that this address has referred.

bash
curl https://mainnet.api.ryze.pro/api/referral/0xYourAddress/referred \
  -H "Authorization: Bearer <privy_token>"

Response 200

json
{
  "address": "0xyouraddress",
  "referredUsers": [
    {
      "address": "0xreferred1...",
      "createdAt": "2026-04-10T00:00:00.000Z"
    },
    {
      "address": "0xreferred2...",
      "createdAt": "2026-04-12T00:00:00.000Z"
    }
  ]
}

Errors

CodeReason
403Authenticated wallet doesn't match :address