> ## Documentation Index
> Fetch the complete documentation index at: https://mavrodi.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Referral Links: Invite New Participants to InviteBot

> Create and share invite links to bring new people into InviteBot, auto-assign a Guider, set a starting stage, and track your referral stats.

A referral link is a special Telegram deeplink that registers a new participant through your invite code. When someone clicks your link, the bot automatically assigns them a Guider, optionally places them into a specific onboarding stage, and records the registration against your invite — so you can track who you brought in and earn referral bonuses once they start participating.

## Getting your invite code

Before you can share a link, you need an invite code. Use these two commands in the bot:

* `/invite` — view and manage your existing invite codes, or add new ones.
* `/invites` — see your ready-made referral links, formatted and ready to copy.

<Note>
  Invite codes must be unique across the platform: 6–20 characters, using letters, numbers, and dashes only. You cannot use your own invite link to register yourself.
</Note>

## Link format

Every referral link follows this structure:

```text theme={null}
https://t.me/YOUR_BOT_NAME?start=PARAMETERS
```

The `PARAMETERS` portion is built from up to three parts, joined by specific separators:

```text theme={null}
g-INVITE_CODE--GUIDER_ID---STAGE
```

| Part          | Separator                  | Description                                                                  |
| ------------- | -------------------------- | ---------------------------------------------------------------------------- |
| `g-` prefix   | —                          | Optional. Activates **game mode** (Tapalka), skipping standard registration. |
| `INVITE_CODE` | —                          | Your unique invite code.                                                     |
| `GUIDER_ID`   | `--` (double dash before)  | Optional. Forces a specific Guider by their Telegram ID.                     |
| `STAGE`       | `---` (triple dash before) | Optional. Sets the starting onboarding stage.                                |

## Link examples

<Tabs>
  <Tab title="Simple invite">
    The most common link. Registers the new user under your invite code and lets the Rotation system assign them a Guider automatically.

    ```text theme={null}
    https://t.me/YOUR_BOT_NAME?start=my_invite_code
    ```

    The new participant is attached to your invite and receives a Guider via Rotation.
  </Tab>

  <Tab title="Forced Guider">
    Specify a Guider by their Telegram ID to bypass Rotation entirely.

    ```text theme={null}
    https://t.me/YOUR_BOT_NAME?start=my_invite_code--123456789
    ```

    The participant is assigned directly to the Guider with ID `123456789`.
  </Tab>

  <Tab title="Custom stage">
    Start the new participant at a specific onboarding stage instead of the default one.

    ```text theme={null}
    https://t.me/YOUR_BOT_NAME?start=my_invite_code---welcome
    ```

    The participant enters the system at the `welcome` stage.
  </Tab>

  <Tab title="Game mode">
    Combine invite code, Guider, and stage with the `g-` prefix to send the new user straight into the Tapalka mini-game.

    ```text theme={null}
    https://t.me/YOUR_BOT_NAME?start=g-my_invite_code--123456789---game_start
    ```

    The participant skips standard registration and goes directly to game mode, assigned to the specified Guider.
  </Tab>

  <Tab title="Guider only">
    Attach a Guider without linking to any invite code. Leave the invite portion blank and start directly with `--`.

    ```text theme={null}
    https://t.me/YOUR_BOT_NAME?start=--123456789
    ```

    The participant gets the specified Guider but is not counted against any invite code.
  </Tab>
</Tabs>

## Game mode (`g-` prefix)

Adding the `g-` prefix before your invite code activates **game mode**. The new user skips the standard registration flow and goes straight to the Tapalka mini-game. They can earn Mavriks (Taps) and Tickets from the moment they arrive, and access the game later via `/game` in the bot.

Use game-mode links when you want to attract participants through the game experience first, before they engage with the full mutual aid workflow.

## How Guider assignment works

If you don't specify a Guider ID in the link, the system determines one automatically in this order:

<Steps>
  <Step title="Invite-based lookup">
    The system checks whether your invite code is associated with a specific Guider.
  </Step>

  <Step title="General Rotation">
    If no Guider is found via the invite, the system picks one from the general Rotation queue, distributing newcomers evenly.
  </Step>
</Steps>

Specifying `--GUIDER_ID` in the link skips both steps and assigns that Guider directly.

## How starting stage is determined

When multiple sources could set a starting stage, the system follows this priority order (highest wins):

1. Stage from the link (`---STAGE`)
2. Stage set in the invite's Rotation entry
3. Stage from the referrer's profile
4. Stage from the Guider's profile
5. Default system stage (`start`)

<Tip>
  If you want everyone arriving through your link to start at the same stage, include it explicitly in the link using the `---STAGE` suffix.
</Tip>

## Tracking your referral statistics

After you share a link, track its performance with:

```text theme={null}
/stats_YOUR_INVITE_CODE
```

This command shows you:

* **Click count** — how many people opened the link.
* **Registration count** — how many of those completed registration.

Replace `YOUR_INVITE_CODE` with your actual code, for example `/stats_my_invite_code`.

## Rules and limits

* You **cannot** invite yourself — your own invite code cannot be used for your own registration.
* You **cannot** be your own referrer.
* Invite codes must be **unique** across the entire platform (6–20 characters, letters, numbers, dashes).
* **Test your links** with a secondary account or a trusted contact before sharing them widely.

<CardGroup cols={2}>
  <Card title="Tapalka & Tickets" icon="gamepad-2" href="/invites/game-and-tickets">
    Learn how to earn Mavriks in the mini-game and enter prize Rounds with Tickets.
  </Card>

  <Card title="Participant commands" icon="terminal" href="/participants/commands">
    Full reference of all bot commands available to participants.
  </Card>
</CardGroup>
