---
title: "Get User Referral Code"
method: GET
path: "/v1/referral/user_refferal_code"
tags: ["referral"]
---

# Get User Referral Code

`GET /v1/referral/user_refferal_code`

## Request

- Base URL: `https://api.linktodm.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.linktodm.com/v1/referral/user_refferal_code`
- Auth: HTTP bearer

Get referral code for user user which can be used to reffer other users.

Read-only: the promo code is whatever the member has already activated.
Minting one creates discounts at Dodo and Lemon Squeezy, so it happens only
on an explicit activate / set request, never from loading the page.

## Response `200`

Successful Response

- UserReferralCodeResponseSchema: What the refer-and-earn page needs: the link code plus the promo code. `promo_code` is None until the member activates one -- codes are never minted by reading this, because creating one also creates discounts at the payment providers. `suggested_promo_code` is what activating would give them, computed without writing anything.
  - `referral_code` string, required
  - `promo_code` string, nullable
  - `promo_discount_percent` integer, nullable
  - `suggested_promo_code` string, nullable
  - `can_refer` boolean
  - `min_followers` integer
  - `state` 'LOCKED_FREE' | 'LOCKED_FOLLOWERS' | 'ELIGIBLE' | 'ACTIVATED': Where a member stands in the referral programme. LOCKED_FREE no paid plan LOCKED_FOLLOWERS paid, but no Instagram account over the follower bar ELIGIBLE allowed a code, hasn't activated one yet ACTIVATED holds a live code

---

[API](https://skmtc.dev/linktodm/apis/salesmorph.md) - [All operations](https://skmtc.dev/linktodm/apis/salesmorph/llms.txt) - [OpenAPI document](https://skmtc.dev/linktodm/apis/salesmorph/revisions/4af0ad5dbe92?raw)
