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

> ## Agent Instructions
> Integrating Pilot Status end to end? Follow https://docs.pilotstatus.com.br/guides/integrate-with-ai.md (pt-BR: https://docs.pilotstatus.com.br/pt-BR/guides/integrate-with-ai.md). No step requires contacting support: every credential is shown in the dashboard or in an API response, and a lost one is regenerated, not recovered.
> Webhook signing secret: shown ONCE in the Signing secret window right after creating the webhook on /webhooks, and in the `secret` field of the POST /v1/webhooks response (MCP: webhooks_create). Lost it: Edit Webhook → Generate a new secret, POST /v1/webhooks/{id}/rotate-secret, or webhooks_rotate_secret (the old one stops working at once). Verify `x-pilot-status-signature` = hex HMAC-SHA256 of the raw request body keyed with that secret.
> Meta verify token (number connected with the user's own Meta app credentials): Meta Number Created! window after connecting, then the number's card on Numbers (workspace Owner), or webhook.verifyToken in the POST /v1/numbers/meta response. It is not the webhook signing secret.
> REST auth: `x-api-key: ps_...` header, never Authorization: Bearer. MCP: https://mcp.pilotstatus.com.br/mcp (148 tools, OAuth 2.1 or x-api-key); Code Mode: https://mcp.pilotstatus.com.br/code. Destructive MCP tools return a preview and a confirm_token: show the preview and call again only after the user's explicit yes. Over OAuth, revealing or creating ps_ API keys is workspace Owner only.

# The hosted connect page (/connect/[token])

> What your end customer sees when they open a remote pairing link: the QR code with a pairing code (expires in 40 s and refreshes), the 'Continuar com o Facebook' Embedded Signup button, or the Meta credentials form (Phone Number ID, WABA ID, System Token, App Secret, App ID). No login, Portuguese-only, white-labeled with your branding. Links last 24 h (QR) or 30 min (Meta).

The connect page is the public page at `https://connect.pilotstatus.com.br/connect/<token>`. You send it to a customer so **they** can connect their WhatsApp number to **your** workspace, without an account in your dashboard and without you ever seeing their phone.

It is not a dashboard screen. It opens without login, and the token in the URL is the only credential. This page describes what the person on the other side sees. To **embed** it in your own app (iframe, `postMessage` events, button mode, button styling), read [Embed the Connect Page](https://docs.pilotstatus.com.br/integrations/embed-connect.md).

![Hosted connect page](https://mintcdn.com/iaxp/i93gv5Lm6WoHL1rE/images/dashboard/connect-page.png?fit=max\&auto=format\&n=i93gv5Lm6WoHL1rE\&q=85\&s=9b8f7e0bf20df80d1e9688ccc7b7fb4f)

The hosted connect page, with the tenant's logo, colors and title.

## Where the link comes from

You create the link. There are two ways:

* **In the dashboard**: the **Numbers** screen's connect flow can generate a remote pairing link instead of showing the QR code to you. See [Numbers](https://docs.pilotstatus.com.br/dashboard/numbers.md).
* **Over the API or MCP**: [`POST /v1/numbers/remote-pairing`](https://docs.pilotstatus.com.br/api/numbers/remote-pairing), or the MCP tool `numbers_remote_pairing`. The response carries `remotePairingUrl`.

The link decides which flow the customer sees:

| Link | Flow on the page | Lifetime |
| - | - | - |
| Pilot Status web number (QR, the default) | QR code plus pairing code | **24 hours**, single-use |
| Meta, `metaFlow: "embedded"` | Facebook Embedded Signup button | **30 minutes** |
| Meta, `metaFlow: "credentials"` | Form for the Cloud API credentials | **30 minutes** |

## What the customer sees

The page is in **Portuguese** only. Labels below are quoted as they appear.

### Header and footer

At the top is your logo, or your company name if there is no logo, with a subtitle. Both come from your branding. The browser tab shows your company name, or *Conectar WhatsApp*.

At the bottom:

* *Pilot Status — Plataforma de mensagens WhatsApp*, unless your branding hides Pilot Status.
* A **Precisa de ajuda?** link, if your branding has a support URL.
* A small **secured by pilotstatus.com.br** link. It always shows and cannot be removed on the full page.

### QR pairing (Pilot Status web number)

1. The card shows the number's name, its initial and the masked number (for example `+5511****9999`), plus a **Conectar Dispositivo** button (*Preparando...* while it loads).
2. After the click, the page shows **Escaneie o QR Code** with:
   * a **Código de pareamento** that copies on click (**Copiar código**),
   * the QR code,
   * the countdown **Expira em Ns**. Each QR lasts 40 seconds and the page fetches a new one by itself.
3. The instructions say: open WhatsApp on the phone, go to **Menu > Dispositivos conectados > Conectar um dispositivo**, and scan the QR code or type the pairing code.
4. Once the phone links, the page shows **Conectado com sucesso!** — *O número WhatsApp foi conectado. Você pode fechar esta página.*

If the workspace cannot take another number (for example, its plan limit is reached), the customer reads a neutral message: *Este número não pode ser conectado agora. Fale com quem enviou este link.* Plan details never show on this page. A temporary failure says *Erro ao gerar QR Code. Tente novamente.* and offers **Tentar novamente**.

### Official number, Embedded Signup

1. The card shows **Conectar WhatsApp Business**: *you will log in to Facebook and pick the number of your official WhatsApp account (Meta Cloud API). No credentials are needed here.*
2. The button reads **Continuar com o Facebook** by default. Your link's button styling can change the label. It opens Meta's dialog, where the customer picks or creates the business account and the number.
3. On a phone, a notice suggests opening the link on a computer, because the Meta connection may not finish on mobile. This notice is skipped when the link uses the redirect flow, which is built for mobile.
4. If the customer comes back to the page after finishing in Facebook but the page never got the result, it offers **Concluiu no Facebook? Finalizar conexão**. That opens a phone field (*Informe o número que você conectou no WhatsApp Business*) and a **Finalizar conexão** button. Afterwards the page says the request was received: the number appears in the dashboard shortly if Meta connected it, otherwise the Pilot Status team gets in touch.
5. On success: **Conectado com sucesso!**

### Official number, credentials form

**Conectar WhatsApp Business** asks for the credentials of the official account, found in Meta Business / WhatsApp Manager. All fields are required:

| Field | Example placeholder |
| - | - |
| **Nome** | *Ex.: Atendimento principal* |
| **Número** | `+55 11 99999-9999` |
| **Phone Number ID** | `123456789012345` |
| **WABA ID** | `098765432109876` |
| **System Token** | `EAA...` (hidden input) |
| **App Secret** | `abcdef123456...` (hidden input) |
| **App ID** | `1234567890` |

Below the fields there is a checkbox, on by default: **Receber as mensagens automaticamente na Pilot Status (recomendado).** — *Configuramos o webhook desta conta (WABA) para você — sem passos manuais.* With it on, Pilot Status subscribes the account (WABA) at Meta with its own callback URL and the number's verify token, so incoming messages reach Pilot Status with no manual steps. Under the label, in smaller print: *Atenção: redireciona os webhooks de **toda a WABA**. Se este número já envia eventos para outra integração, ela deixa de recebê-los. Desmarque para configurar o webhook manualmente depois.*

> [!WARNING]
>
> The routing applies to the **whole WABA**, not just this number: if a number in that account already sends events to another integration, that integration stops getting them. When the customer **unchecks** the box, the page shows a warning right away: *Você vai precisar colar a URL de callback e o Verify token nas configurações de webhook do seu app na Meta. Até fazer isso, nenhuma mensagem recebida chega à Pilot Status.*

The customer submits with **Conectar** (*Conectando...* while it runs). If Meta or Pilot Status refuses the credentials, the error appears under the button. The page never shows the System Token or the App Secret back.

#### When the webhook still has to be set up

The success screen depends on whether the WABA was really routed to Pilot Status:

* **Routed** (box checked and Meta accepted the subscription): the usual **Conectado com sucesso!**.
* **Not routed** — the box was unchecked, or it was checked but the subscription at Meta failed: the page shows **Falta um passo: configure o webhook na Meta** — *O número foi conectado, mas as mensagens recebidas só chegam à Pilot Status depois que você configurar o webhook no seu app da Meta.* When the routing was requested and failed, the text starts with *Não conseguimos configurar o webhook automaticamente para você.* Then:
  * **URL de Callback** and **Verify Token**, each with a **Copiar** button;
  * the steps: 1. *Acesse o Meta App Dashboard* · 2. *WhatsApp → Configuração → Webhook* · 3. *Cole a URL de callback e o Verify token acima e clique em “Verificar e salvar”* · 4. *Assine os campos:* `messages`, `message_template_status_update`;
  * a notice: *Copie o Verify token agora: ele não será mostrado de novo nesta página. Depois, o dono do workspace pode copiá-lo no card do número, na tela Números do painel.*

The connected number fires `number.connected` either way, and its payload says whether the webhook was routed (it never carries the verify token). Afterwards, the workspace **Owner** can copy the verify token again from the number's row on the [Numbers](https://docs.pilotstatus.com.br/dashboard/numbers.md) screen.

### After connecting, expiring, errors

* **Redirect**: if the link was created with a `redirectUrl` and the page is not embedded, the browser goes there about 2.5 seconds after **Conectado com sucesso!**. When the manual webhook setup is on screen there is no automatic redirect — the verify token is shown only there — and the customer leaves with a **Continuar** button once they copied it. Embedded pages instead send `connect:paired` to the host app.
* **Expired or used link**: **Link expirado** — *Este link de pareamento expirou ou já foi utilizado. Solicite um novo link ao seu fornecedor.* The customer cannot renew it. You create a new link.
* **Network errors**: messages such as *Erro de conexão. Verifique sua internet.* Errors that can be retried show **Tentar novamente**.

## Branding

The look comes from, in order of precedence:

1. Cosmetic URL parameters. These apply only once the token is valid.
2. The link's own `branding`.
3. Your workspace branding ([`/v1/branding`](https://docs.pilotstatus.com.br/api/branding)).
4. Pilot Status defaults.

The full table is in [White-label / branding](https://docs.pilotstatus.com.br/integrations/embed-connect.md).

## Who can create the link

Creating a pairing link is connecting a number, so it needs the `numbers:connect` permission. **Owner** and **Admin** have it; Agent and Analyst do not. The same permission applies over the API and MCP. The person who opens the link needs no account and no role.

## Do it via API / MCP

| Step | Public API | MCP tool |
| - | - | - |
| Create the link | [`POST /v1/numbers/remote-pairing`](https://docs.pilotstatus.com.br/api/numbers/remote-pairing) | `numbers_remote_pairing` |
| Watch the number connect | [`GET /v1/numbers/{id}/status`](https://docs.pilotstatus.com.br/api/numbers/status) | `numbers_status` |
| Get notified when it connects | [Webhooks](https://docs.pilotstatus.com.br/dashboard/webhooks.md), or `connect:paired` when embedded | — |
| What the customer does on the page | Only on the page. The token endpoints it calls are public and tied to the link. | — |

## Related

* [Embed the Connect Page](https://docs.pilotstatus.com.br/integrations/embed-connect.md): iframe, button mode, `postMessage` events, button styling.
* [Embedded Signup in your app](https://docs.pilotstatus.com.br/guides/embedded-signup.md).
* [Remote pairing API](https://docs.pilotstatus.com.br/api/numbers/remote-pairing.md).
* [Numbers](https://docs.pilotstatus.com.br/dashboard/numbers.md).


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