Skip to content
Micup API

Referral

The referral programme rewards an account for bringing others to the instance. Every account has one personal code. A new account that registers through a link carrying that code, /r/<code>, is linked to its owner. Once the new account has stayed active long enough and passed the programme’s checks, it counts as a valid referral, and the owner earns each reward tier whose threshold the count reaches. The Admin API opens and closes the programme and sets the tiers.

The one route on this page is user-only, requires no permission, and acts on the caller’s own account. A bot or OAuth2 bearer credential is refused with 403 ACCESS_DENIED. No route reads the code or the referrals of another account.

A code is 10 characters from a to z and 2 to 7, and the server creates it from random bytes on the first read after the programme opens. The code of an account never changes. A client builds the referral link from it and carries the code to Register an account as referral_code.

A referred account is in one of three states. The state decides which count it adds to.

ValueDescription
pendingThe account registered through the code and is not decided yet
validThe account stayed active for min_active_days days with a verified email address and passed the programme’s checks
rejectedThe account failed the checks, or was still undecided 14 days after its active period ended

The decision is made once and never reverses. A valid referral stays counted if the referred account is deleted later. A referral that is still pending when the referred account is deleted becomes rejected.

ValueDescription
cosmeticAn owned-availability cosmetic item, added to the account without being worn
premium_daysDays of premium added to the account
offsiteA reward staff hand over by hand, such as one outside the instance
ValueDescription
grantingThe server is delivering the reward, and the status changes shortly
auto_deliveredA cosmetic or premium reward was delivered
pending_adminAn off-site reward is waiting for staff to deliver it
deliveredStaff delivered an off-site reward
FieldTypeDescription
tier_idsnowflakeThe ID of the tier that gave the reward
rewardreferral tier reward objectWhat the tier gave, as it was when the account earned it
statusstringThe status of the reward
granted_atISO8601 timestampWhen the account reached the tier
delivered_at?ISO8601 timestampWhen the reward was delivered, null while it is granting or pending_admin
code1?stringThe code staff typed in for an off-site reward

1 Present only while status is delivered and staff entered a code, and only in this response, which the account that earned the reward alone can read. The server never puts it in a direct message, an email, the Admin API, or the audit log

The type field decides the other field.

FieldTypeDescription
typestringThe reward type
item_id1snowflakeThe ID of the item
days2integerThe premium days (1-3650)
description3stringWhat staff hand over (1-200 characters)

1 Present for cosmetic

2 Present for premium_days

3 Present for offsite

FieldTypeDescription
idsnowflakeThe ID of the tier
thresholdintegerThe valid referrals needed to earn the tier
rewardreferral tier reward objectWhat the tier gives
FieldTypeDescription
pendingintegerThe referrals not decided yet
validintegerThe valid referrals
rejectedintegerThe rejected referrals

The counts can trail a decision by a few seconds. The response does not say why a referral was rejected.

FieldTypeDescription
enabledbooleanWhether the programme is open
code?stringThe account’s referral code, null while the programme is closed
countsreferral counts objectThe referrals of the account by state
min_active_daysintegerThe days a referred account must stay active to count
tiersarray[referral tier object]The tiers that are on, lowest threshold first
rewardsarray[referral reward object]The rewards the account has earned
GET/v1/users/@me/referral

Returns the referral object of the caller. While the programme is open, the first read creates the account’s code, and every later read returns the same one.

A tier that is turned off after the account earned it stays in rewards, and a tier raised above the account’s count takes nothing back.

StatusBodyCondition
200referral objectThe referral was returned
401error responseNo account is signed in
403error responseThe credential is a bot or OAuth2 bearer token, returned as ACCESS_DENIED

30 requests per minute for each authenticated user, on the referral:me bucket.