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

# Panel de analíticas

> Devuelve los agregados de envío de UN número de WhatsApp, los mismos datos que la pantalla de Analítica del panel: totales, tasas, una serie diaria (una entrada por día calendario en `timezone`), conteos y porcentajes por estado, conteo de entrantes, los 5 templates principales y envíos por origen.

Todos los totales cuentan los mensajes SALIENTES del número creados en la ventana; `totalSent` = `totalDelivered` (SENT/DELIVERED/READ) + `totalFailed` + `totalQueued`. Las tasas van de 0 a 100 con 2 decimales. Los resultados se guardan en caché hasta 60 s por número/período/zona horaria.

Un `period` fuera de `7d`/`30d`/`90d` se trata en silencio como `30d` (sin 400). `timezone` (alias `tz`; `timezone` gana cuando se envían ambos) tiene como valor predeterminado `UTC` y se devuelve en la respuesta.

**Actúa sobre un número.** Usa una clave de número (`ps_number_`), o una clave de workspace / clave de cuenta (`ps_account_` + `x-workspace-id`) / token OAuth con el header `x-whatsapp-number-id`; sin él, una credencial de todo el workspace recibe 403 `TENANT_SCOPE_NOT_ALLOWED`. Todos los roles del workspace tienen `analytics:read`. 409 cuando la credencial no está vinculada a un número.



## OpenAPI

````yaml openapi.es.json GET /v1/analytics/dashboard
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/analytics/dashboard:
    get:
      tags:
        - Analytics
      summary: Panel de analítica
      description: >-
        Devuelve los agregados de envío de UN número de WhatsApp, los mismos
        datos que la pantalla de Analítica del panel: totales, tasas, una serie
        diaria (una entrada por día calendario en `timezone`), conteos y
        porcentajes por estado, conteo de entrantes, los 5 templates principales
        y envíos por origen.


        Todos los totales cuentan los mensajes SALIENTES del número creados en
        la ventana; `totalSent` = `totalDelivered` (SENT/DELIVERED/READ) +
        `totalFailed` + `totalQueued`. Las tasas van de 0 a 100 con 2 decimales.
        Los resultados se guardan en caché hasta 60 s por número/período/zona
        horaria.


        Un `period` fuera de `7d`/`30d`/`90d` se trata en silencio como `30d`
        (sin 400). `timezone` (alias `tz`; `timezone` gana cuando se envían
        ambos) tiene como valor predeterminado `UTC` y se devuelve en la
        respuesta.


        **Actúa sobre un número.** Usa una clave de número (`ps_number_`), o una
        clave de workspace / clave de cuenta (`ps_account_` + `x-workspace-id`)
        / token OAuth con el header `x-whatsapp-number-id`; sin él, una
        credencial de todo el workspace recibe 403 `TENANT_SCOPE_NOT_ALLOWED`.
        Todos los roles del workspace tienen `analytics:read`. 409 cuando la
        credencial no está vinculada a un número.
      operationId: get_analytics_dashboard
      parameters:
        - name: period
          in: query
          required: false
          description: >-
            Ventana de tiempo: `7d`, `30d` (predeterminado) o `90d`. Cualquier
            otro valor recurre a `30d`.
          schema:
            type: string
            enum:
              - 7d
              - 30d
              - 90d
            default: 30d
          example: 30d
        - name: timezone
          in: query
          required: false
          description: >-
            Zona horaria IANA para los agrupamientos diarios (alias: `tz`;
            predeterminado `UTC`).
          schema:
            type: string
            default: UTC
          example: America/Sao_Paulo
      responses:
        '200':
          description: Agregados del panel
          content:
            application/json:
              example:
                period: 7d
                timezone: America/Sao_Paulo
                totalSent: 120
                totalDelivered: 115
                totalRead: 45
                totalFailed: 3
                totalQueued: 2
                deliveryRate: 95.83
                readRate: 39.13
                failureRate: 2.5
                responseRate: 39.13
                avgDeliveryTime: 1.84
                avgReadTime: 412.5
                messagesOverTime:
                  - date: '2026-11-03'
                    total: 15
                    queued: 0
                    sent: 15
                    delivered: 14
                    read: 6
                    failed: 1
                  - date: '2026-11-04'
                    total: 22
                    queued: 0
                    sent: 22
                    delivered: 21
                    read: 8
                    failed: 1
                  - date: '2026-11-05'
                    total: 18
                    queued: 0
                    sent: 18
                    delivered: 18
                    read: 7
                    failed: 0
                  - date: '2026-11-06'
                    total: 20
                    queued: 0
                    sent: 20
                    delivered: 19
                    read: 9
                    failed: 1
                  - date: '2026-11-07'
                    total: 12
                    queued: 0
                    sent: 12
                    delivered: 12
                    read: 5
                    failed: 0
                  - date: '2026-11-08'
                    total: 14
                    queued: 0
                    sent: 14
                    delivered: 14
                    read: 4
                    failed: 0
                  - date: '2026-11-09'
                    total: 19
                    queued: 2
                    sent: 19
                    delivered: 17
                    read: 6
                    failed: 0
                statusDistribution:
                  queued: 2
                  delivered: 115
                  read: 45
                  failed: 3
                statusPercentages:
                  queued: 1.67
                  delivered: 95.83
                  read: 37.5
                  failed: 2.5
                totalReceived: 87
                topTemplates:
                  - templateVersionId: cmh1a2b3c4d5e6f7g8h9
                    templateId: cmh1a2b3c4d5e6f7g8h9
                    templateName: order_update
                    version: null
                    count: 64
                topOrigins:
                  - origin: API
                    count: 95
                  - origin: CHAT
                    count: 20
        '400':
          description: Clave de cuenta sin `x-workspace-id`
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: >-
                  An account API key must name the workspace to act on: send the
                  x-workspace-id header (a workspace id from GET /v1/workspaces)
                  | Uma API key de conta precisa indicar o workspace: envie o
                  header x-workspace-id (o id de um workspace, obtido em GET
                  /v1/workspaces)
                code: WORKSPACE_ID_REQUIRED
        '401':
          description: Credencial ausente o inválida
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Invalid API key
        '403':
          description: >-
            Credencial de todo el workspace sin `x-whatsapp-number-id`, número
            fuera de un permiso OAuth/de clave de cuenta, o usuario que ya no es
            miembro activo
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: >-
                  This endpoint acts on a single WhatsApp number: send the
                  x-whatsapp-number-id header naming the number to act on (its
                  id or instance id from GET /v1/numbers) | Este endpoint atua
                  sobre um único número de WhatsApp: envie o header
                  x-whatsapp-number-id indicando o número desejado (o id dele ou
                  o id da instância, obtidos em GET /v1/numbers)
                code: TENANT_SCOPE_NOT_ALLOWED
              examples:
                TENANT_SCOPE_NOT_ALLOWED:
                  summary: TENANT_SCOPE_NOT_ALLOWED
                  value:
                    error: >-
                      This endpoint acts on a single WhatsApp number: send the
                      x-whatsapp-number-id header naming the number to act on
                      (its id or instance id from GET /v1/numbers) | Este
                      endpoint atua sobre um único número de WhatsApp: envie o
                      header x-whatsapp-number-id indicando o número desejado (o
                      id dele ou o id da instância, obtidos em GET /v1/numbers)
                    code: TENANT_SCOPE_NOT_ALLOWED
                NUMBER_NOT_IN_GRANT:
                  summary: NUMBER_NOT_IN_GRANT
                  value:
                    error: This token is not granted access to that number
                    code: NUMBER_NOT_IN_GRANT
                WORKSPACE_MEMBERSHIP_REQUIRED:
                  summary: WORKSPACE_MEMBERSHIP_REQUIRED
                  value:
                    error: >-
                      The user behind this token is not an active member of this
                      workspace.
                    code: WORKSPACE_MEMBERSHIP_REQUIRED
        '404':
          description: '`x-whatsapp-number-id` no nombra un número de este workspace'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: >-
                  x-whatsapp-number-id does not name a WhatsApp number of this
                  account | x-whatsapp-number-id não indica um número de
                  WhatsApp desta conta
                code: NUMBER_NOT_FOUND
        '409':
          description: La credencial no está vinculada a un número de WhatsApp
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: API key is not linked to a WhatsApp number
        '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
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.