---
title: "Activate Promo Code"
method: POST
path: "/v1/referral/activate_promo_code"
tags: ["referral"]
---

# Activate Promo Code

`POST /v1/referral/activate_promo_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/activate_promo_code`
- Auth: HTTP bearer

Mint the member's promo code from their name and register it.

Idempotent: a member who already has a code gets it back, with any missing
provider registration retried.

## 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)
