Skip to main content

GET /referrals/status

Read the user's referral snapshot.

Returns NOT_CREATED sentinel if the user never called /referrals/create.

Use case

Render a "my referrals" dashboard: show code, earnings, head count, activation countdown.

Response 200 (code exists)

{
"status": "OK",
"sReferralCode": "ABCDEF",
"sReferralAddress": "…",
"nReferralPercentage": 10,
"nEarningsSol": 4.237,
"nReferredUsers": 12,
"bIsActive": true,
"dActivatesAt": "2026-04-21T10:00:00.000Z"
}

Response 200 (no code yet)

{
"status": "NOT_CREATED",
"message": "referral code not created yet — call POST /referrals/create to start"
}

Field reference

FieldDescription
nEarningsSolTotal SOL earned so far across all referrals.
nReferredUsersNumber of users signed up under this code.
bIsActivefalse during the 24h cooldown after /referrals/create.
dActivatesAtISO timestamp when bIsActive flips to true.

Example

curl "$BASE_URL/referrals/status" \
-H "Authorization: Bearer $ACCESS" \
-H "x-user-id: $USER_ID"