Skip to main content
POST
Create protocol referral code

Authorizations

Authorization
string
header
required

JWT token or API key

Body

application/json
code
string
required

Custom referral code (4-20 alphanumeric characters)

Pattern: ^[a-zA-Z0-9]{4,20}$
Example:

"ALICE2025"

network_mode
enum<string>
default:mainnet

Network mode for this referral code

Available options:
testnet,
mainnet,
both
Example:

"mainnet"

Response

Successful response

success
enum<boolean>
required
Available options:
true
referral_code
string
required

The created referral code (lowercase). Frontend should construct full URL as ${APP_URL}/join/${code}

Example:

"alice2025"

created_at
string
required

Timestamp when the code was created

Example:

"2025-01-06T12:00:00Z"