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

# Activate the invitation

> The invitation e-mail link: how it opens the session and what to do if it expired.

## At a glance

| Field | Value |
| - | - |
| Status | **Available** (behind a feature flag) |
| Route | `/{locale}/onboarding/activate?token_hash=…` (public) |
| Menu | Outside the menu: entered from the invitation e-mail |
| Feature flag | `portal-customer-onboarding` (default: off) |
| Who sees it | Invited customers: primary user of a personal account or legal representative of a company |
| Last verified | 2026-11-10 against `develop` (`c10d24f33d`) |

## What it is for

The page the invitation e-mail leads to. It turns the link into a portal session without a password and takes the customer to the wizard. If the link expired or was already used, it offers to ask for a new one.

## How to get there

From the invitation e-mail button.

![Onboarding journey: invitation e-mail, link activation, Welcome, Validate ID, one Payment method per business unit and Create password, which leads to the success destination. Exit leads to the exit destination and progress is kept.](https://mintcdn.com/bbrands/w6DX1nTsRjzB7VQp/images/portal-customer-manual/onboarding-navigation.svg?fit=max\&auto=format\&n=w6DX1nTsRjzB7VQp\&q=85\&s=134dc85f30315cfd7f439f584a3787e2)

Onboarding journey

## What the customer sees

> [tab] Desktop
>
> ![This link is no longer valid screen with the Send a new link and Exit buttons.](https://mintcdn.com/bbrands/faC9xD4-ppUP5Q_S/images/portal-customer-screens/onboarding/activate-expired.en.desktop.webp?fit=max\&auto=format\&n=faC9xD4-ppUP5Q_S\&q=85\&s=8b3d9ce2c8c51a2ab2082d7ec2ed33ed)
>
> Expired or used link

> [tab] Mobile
>
> ![This link is no longer valid screen with the Send a new link and Exit buttons.](https://mintcdn.com/bbrands/faC9xD4-ppUP5Q_S/images/portal-customer-screens/onboarding/activate-expired.en.mobile.webp?fit=max\&auto=format\&n=faC9xD4-ppUP5Q_S\&q=85\&s=4f278c5d33a1b1d55055d19d4fe9ade8)
>
> Expired or used link

| Element | What it does |
| - | - |
| **Send a new link** | Sends a new link to the e-mail (only when the link carried the invitation reference) |
| **Exit** | Goes to the exit destination |

## Step by step

**1. Open the e-mail link**

They see "Activating your account…" while the session opens; then the wizard.

**2. If the link does not work**

They see "This link is no longer valid" and tap **Send a new link**. It shows: "Done. Check your inbox: we sent you a new link."

> [tab] Desktop
>
> ![New link sent confirmation under the This link is no longer valid title.](https://mintcdn.com/bbrands/faC9xD4-ppUP5Q_S/images/portal-customer-screens/onboarding/activate-resent.en.desktop.webp?fit=max\&auto=format\&n=faC9xD4-ppUP5Q_S\&q=85\&s=d8682ac6ddd33119e99195d749e5f85e)

> [tab] Mobile
>
> ![New link sent confirmation under the This link is no longer valid title.](https://mintcdn.com/bbrands/faC9xD4-ppUP5Q_S/images/portal-customer-screens/onboarding/activate-resent.en.mobile.webp?fit=max\&auto=format\&n=faC9xD4-ppUP5Q_S\&q=85\&s=f439f1a70dd993e73462c0e57b8a7277)

**3. Open the new e-mail**

The new link opens the session and resumes the onboarding.

## Business rules

| ID | Rule |
| - | - |
| R-01 | The link is single-use and expires |
| R-02 | The link token is removed from the address as soon as it is read, so it is not kept in the history |
| R-03 | The browser never calls horizon-api with the token: the portal server does (`/api/auth/magic-link`) |
| R-04 | Asking for a new link needs the invitation reference (`ref`); without it, the customer must use the latest e-mail |
| R-05 | There is an attempt limit |

## States and messages

| State | What the customer sees | Why | What to do |
| - | - | - | - |
| Activating | "Activating your account…" | The link is being redeemed | Wait |
| Expired or used | "This link is no longer valid" — The link expired or was already used. Ask for a new one and we will email it to you. | 410 | **Send a new link** |
| Expired without reference | "This link is no longer valid" — The link expired or was already used. Use the link in the most recent email. | 410 | Use the latest e-mail |
| Too many attempts | "Too many attempts. Wait a few minutes and try again." | 429 | Wait a few minutes |
| Failed | "Something went wrong" — We could not activate your account. Please try again. | 400 / 503 | **Try again** |

> [tab] Desktop
>
> ![Error screen for too many attempts with Try again and Exit.](https://mintcdn.com/bbrands/faC9xD4-ppUP5Q_S/images/portal-customer-screens/onboarding/activate-rate-limited.en.desktop.webp?fit=max\&auto=format\&n=faC9xD4-ppUP5Q_S\&q=85\&s=42181b0e63c01bb13d88cad1d273332e)

> [tab] Mobile
>
> ![Error screen for too many attempts with Try again and Exit.](https://mintcdn.com/bbrands/faC9xD4-ppUP5Q_S/images/portal-customer-screens/onboarding/activate-rate-limited.en.mobile.webp?fit=max\&auto=format\&n=faC9xD4-ppUP5Q_S\&q=85\&s=bf581be76dcba501ae93101ebd72ccea)

## Errors

| Message | Cause | Backend code | Support action |
| - | - | - | - |
| "We could not send the link. Please try again." | The resend failed | `POST /api/v3/auth/magic-link/resend` | Retry or resend the invitation from Horizon Enterprise |
| "Too many attempts. Wait a few minutes and try again." | Many attempts in a row | 429 | Wait |
| "We could not activate your account. Please try again." | Horizon or Supabase unavailable | 503 | Retry later |

## Why it works this way

![Activation: the link with token\_hash reaches the portal, the portal server redeems it in horizon-api, the session is created and the wizard opens; if it expired a new link is offered, if there were too many attempts the customer is asked to wait.](https://mintcdn.com/bbrands/w6DX1nTsRjzB7VQp/images/portal-customer-manual/onboarding-activation-process.svg?fit=max\&auto=format\&n=w6DX1nTsRjzB7VQp\&q=85\&s=74e9d2107502a8890d258f519dd92fc2)

How the invitation is activated

The link replaces the password the customer does not have yet, which is why it is single-use, expires and is redeemed on the server. Asking for a new one from the same screen saves the customer a call.

## Technical detail

| Aspect | Detail |
| - | - |
| Screen | `app/[locale]/(public)/onboarding/activate/onboarding-activate-screen.tsx` |
| BFF | `POST /api/auth/magic-link` → `POST /api/v3/auth/magic-link/login`; `POST /api/auth/magic-link/resend` → `…/resend` |
| Texts | `messages` › `onboarding.activate` |

## FAQ and support cases

> [accordion] The link says it is no longer valid and the customer never used it
>
> It may have expired or been opened earlier (some e-mail filters open links). Ask for a new one.

## Related and history

* [Flow overview](https://docs.bbrands.io/portal-customer/onboarding/overview.md)

| Date | Change |
| - | - |
| 2026-11-10 | First version |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.