# Member referrals

> Each member gets a referral link; whoever joins through it counts as referred, once, and the team sees who brought whom. Turning it on and off, the rules for when it counts, points, workflows and the report.

**Member referrals** give each person in the community their own link to invite others. Whoever joins through the link is recorded as **referred** by them: the team sees who brought whom, and the community can give points and badges for referrals and fire workflows when someone refers.

## What it's for

| Community | How it uses it |
|---|---|
| Community that grows by word of mouth | Turns referrals on and follows who brings in the most new people |
| Community with gamification | Gives points for the **Refer a member** action and a badge to whoever refers 5 people |
| Ambassador program | A workflow with **Referred someone** sends a thank-you DM and puts the person in the *Ambassadors* group |

## Who can

| Role | What they do |
|---|---|
| Owner and admin | Turn referrals on and off; see the report and each member's **Referred by** |
| Moderator | Sees the report and the **Referred by** |
| Finance | Does not see the report or who referred whom (it is personal data, outside finance) |
| Member | Gets their own link and sees how many people they referred |

## Where it is

| Who | Where |
|---|---|
| Owner and admin | **Settings › Access and sign-up**, **Referrals** card: the switch turns it on and off, and **See the referrals report** opens the report |
| Owner, admin and moderator | **Members › Referrals**: each person who referred, with **Member**, **Referrals** and **Latest**, the **Period** (**30 days**, **90 days** or **All time**) and **Download CSV**. On another member's page, the **Referred by** card (*"Only the team sees this."*) |
| Member | **My Account › Refer** and their own page: the **Refer the community** card, with the link, **Copy** and how many people came in through it. It shows only while referrals are on |

Whoever opens the link and signs up in the app counts as referred: the app keeps the code for 30 days, and the **Referred someone** trigger is in the [workflow](/notificacoes/workflows) editor.

## How it works

### Turning it on

Referrals start **off**. When on, each member has their own code, created the first time they ask for the link, and the link is the community's address with `?ref=` and the code (`https://yourcommunity.memberfy.net/?ref=ana7k2`). When off, nobody has a link, and a received code does not count.

### When a referral counts

A referral counts **once**, when the referred person **becomes a member**, and only if:

- referrals are on in the community at that moment;
- the code belongs to an active member of **this** community;
- whoever joins is not the person who referred (neither by profile nor by e-mail);
- whoever joins **never had a profile** in this community before;
- the link was opened at most **30 days** ago.

The code **never blocks** a sign-up nor opens the community to someone who could not get in: sign-up follows the usual rules (see [Sign-up and access](/membros/cadastro-e-entrada)). In a community with sign-up approval, the code waits along with the request and counts when the request is approved.

### What happens on a referral

- The new person gets the **Referral** source, which shows on the [Dashboard](/membros/dashboard) growth card, among the sources of new members in the last 7 days.
- Whoever referred does the **Refer a member** action of [gamification](/membros/gamificacao): it is worth **0 points** by default (the community chooses how much) and counts toward badge rules and level requirements that use this action.
- The **Referred someone** event goes out, about whoever referred, with the name of whoever joined: a [workflow](/notificacoes/workflows) trigger (with the `referred.name` variable) and the `member.referred` [webhook](/api/eventos-de-webhook).

### The report

For the owner, the admin and the moderator: each person who referred, with how many referrals and the date of the last one, and the total, over a period. It also comes as CSV. Someone who left the community stays in the report, marked as removed.

## Example

The community turns referrals on and gives 50 points for **Refer a member**. Ana gets her link and sends it to Bruno, who opens it, signs up the next day and becomes a member. Ana gets 50 points, Bruno shows up with the **Referral** source, and the workflow with **Referred someone** sends Ana: *"Thanks for bringing Bruno!"*.

## Common errors and how to fix them

| Situation | What to do |
|---|---|
| The referral did not count | Check that referrals were on, that the person never had a profile in the community and that the link was opened less than 30 days ago |
| The person referred themselves with another sign-up | It does not count: the same e-mail or the same profile is refused as a referral |
| The referral gave no points | The **Refer a member** action is worth 0 by default; change the value in the [gamification](/membros/gamificacao) points rules |

## Frequently asked questions

**Does the referred person know who referred them?**
Not here. Whoever referred shows only to the team (owner, admin and moderator).

**Does turning it off erase the referrals?**
No. The referrals that already counted stay; new ones just stop counting.

**Can I refer someone to a paid community?**
Yes. The link leads to the community, and the person gets in by the usual rules, including the purchase. The referral counts when they become a member.

## In the API

`GET` and `PUT /api/referrals/settings` (owner and admin; other roles get `403`) turn it on and off (`enabled`). `GET /api/referrals/me` (any member) returns `enabled`, `code`, `path` (`/?ref=<code>`) and `count`. `GET /api/referrals/report` (owner, admin and moderator; finance gets `403`) returns, per person, `memberId`, `name`, `avatarUrl`, `removed`, `count` and `lastReferredAt`, with `totals`, pagination, `from`/`to` and `format=csv`.

At sign-up, `POST /api/auth/register` and `POST /api/auth/signup-request` accept `referralCode` and `referralSeenAt` (when the link was opened; more than 30 days, ignored). `GET /api/members/{id}` returns `referredBy` (`memberId`, `name`, `avatarUrl`, `removed`, `referredAt`) on someone else's profile, only for owner, admin and moderator, and `source` can be `REFERRAL`. The Dashboard growth card returns `extra.bySource`. See [Referrals](/api/referencia/referrals) in the API reference.

## Through the assistant (MCP)

Ask the assistant for your link (*"what is my referral link?"*, [`get_my_referral`](/mcp/ferramentas-membros#get-my-referral)), for the report (*"who brought the most new members this month?"*, [`get_referral_report`](/mcp/ferramentas-membros#get-referral-report), for the owner, the admin and the moderator) or to turn referrals on ([`update_referral_settings`](/mcp/ferramentas-membros#update-referral-settings)). Who referred a member shows in [`get_member`](/mcp/ferramentas-membros#get-member).

## Related

- [Invite members](/membros/convidar-membros)
- [Sign-up and access](/membros/cadastro-e-entrada)
- [Gamification](/membros/gamificacao)
- [Workflows](/notificacoes/workflows)
- [Webhook events](/api/eventos-de-webhook)
