Skip to main content
GET
/
api
/
v1
/
referral-link
Get referral link for a user
curl --request GET \
  --url https://app.mlm-platform.com/api/v1/referral-link \
  --header 'x-tenant-api-key: <api-key>'
{
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"referral_code": "<string>",
"referral_url": "<string>",
"is_new": true
}

Authorizations

x-tenant-api-key
string
header
required

Tenant API key for authentication. Keys are scoped to specific environments (LIVE or SANDBOX). Obtain keys from the admin dashboard.

Query Parameters

user_id
string<uuid>
required

The user ID to get the referral link for

Response

Referral link retrieved

user_id
string<uuid>

The MLM user ID

referral_code
string

The user's referral code

referral_url
string<uri>

Fully-qualified referral URL (derived from tenant settings)

is_new
boolean

True if the referral code was newly created for the user