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

# Conectar mediante token (QR / emparejamiento)

> Genera el código QR y el código de emparejamiento del número vinculado al token y marca la instancia como CONNECTING. Endpoint público por token (la página /connect/<token>); no requiere clave de API. 409 si ya está OPEN. Efecto real: inicia la conexión. 402 PLAN_NUMBER_LIMIT_REACHED cuando el workspace emisor está en el plan Free, su cupo ya está lleno y este número nunca se conectó.



## OpenAPI

````yaml openapi.es.json POST /v1/remote-pairing/{token}/connect
openapi: 3.1.0
info:
  title: Pilot Status API
  version: 1.0.0
  license:
    name: Pilot Status Terms of Service
    url: https://pilotstatus.com.br/terms
  description: >-
    API REST pública de Pilot Status. Autentícate con el encabezado `x-api-key:
    ps_...` (o `x-api-key-id`). URL base: https://pilotstatus.com.br
servers:
  - url: https://pilotstatus.com.br
security:
  - apiKey: []
  - apiKeyId: []
paths:
  /v1/remote-pairing/{token}/connect:
    post:
      tags:
        - Remote Pairing
      summary: Conectar mediante token (QR / emparejamiento)
      description: >-
        Genera el código QR y el código de emparejamiento del número vinculado
        al token y marca la instancia como CONNECTING. Endpoint público por
        token (la página /connect/<token>); no requiere clave de API. 409 si ya
        está OPEN. Efecto real: inicia la conexión. 402
        PLAN_NUMBER_LIMIT_REACHED cuando el workspace emisor está en el plan
        Free, su cupo ya está lleno y este número nunca se conectó.
      operationId: post_remote-pairing_token_connect
      parameters:
        - name: token
          in: path
          required: true
          description: Token de emparejamiento remoto.
          schema:
            type: string
          example: rp_01HZX...
      responses:
        '200':
          description: Conectar mediante token
          content:
            application/json:
              example:
                qrcodeBase64: data:image/png;base64,iVBORw0KGgo...
                pairingCode: ABCD-1234
        '400':
          description: La instancia del token no tiene workspace
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Instance has no tenant
        '402':
          description: >-
            Solo plan Free: el workspace que emitió el enlace está en el plan
            Free, su cupo de números ya está lleno y este número nunca se
            conectó, así que el emparejamiento se rechaza y no se genera código
            QR. Quien tiene el enlace no puede resolverlo: el workspace debe
            comprar un número adicional de forma explícita o subir de plan.
            Volver a emparejar un número que ya se había conectado nunca se
            rechaza.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - PLAN_NUMBER_LIMIT_REACHED
                  code:
                    type: string
                    enum:
                      - PLAN_NUMBER_LIMIT_REACHED
                  message:
                    type: string
                    description: Frase bilingüe, `English | Português`.
                  plan:
                    type: string
                    enum:
                      - FREE
                  maxNumbers:
                    type: integer
                  currentNumberCount:
                    type: integer
              example:
                error: PLAN_NUMBER_LIMIT_REACHED
                code: PLAN_NUMBER_LIMIT_REACHED
                message: >-
                  This workspace's Free plan has no room for another number. Buy
                  an extra number or upgrade the plan to connect this one. | O
                  plano Grátis deste workspace não comporta mais um número.
                  Compre um número extra ou faça upgrade do plano para conectar
                  este.
                plan: FREE
                maxNumbers: 1
                currentNumberCount: 1
        '404':
          description: Token desconocido o expirado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Invalid or expired token
        '409':
          description: El número ya está conectado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Instance already connected
                state: OPEN
        '429':
          description: Límite de solicitudes excedido
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Too many requests
        '502':
          description: >-
            El proveedor no devolvió ni un código QR ni un código de
            emparejamiento
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Failed to generate QR code
                code: EMPTY_CONNECT_BUNDLE
      security: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Tu API key ps_
    apiKeyId:
      type: apiKey
      in: header
      name: x-api-key-id
      description: Id de la API key (alternativa a x-api-key)

````

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