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

# Listar entregas del webhook del espacio de trabajo

> **Webhooks de workspace**: el mismo registro que `/v1/phone-lines/webhooks` (mismas filas, secreto `plwh_`, firma, reintentos y entregas), con un conjunto de eventos más amplio: todos los eventos `phone_line.*` **más `wallet.topup_paid`** (se acreditó una recarga de la billetera). `"*"` significa solo todos los eventos de líneas telefónicas: `wallet.topup_paid` es opcional, inclúyelo por nombre (por ejemplo `["*", "wallet.topup_paid"]`). Esta superficie lista todos los webhooks del workspace. Clave con alcance de tenant (o clave de cuenta con `x-workspace-id`); Owner o Admin (`phone_lines:webhooks`) con una credencial de usuario.

Devuelve `{ "deliveries": [ … ] }`: las últimas entregas del webhook, **las más recientes primero**, con su estado y resultado, **nunca su payload** (un `phone_line.code_received` lleva el código de activación; lee una entrega completa con `GET …/deliveries/{deliveryId}`). Un webhook de otro workspace responde **404 `WEBHOOK_NOT_FOUND`**, nunca una lista vacía.

Permisos: con una clave de cuenta (`ps_account_`) o un token OAuth / MCP, el usuario debe ser **Owner o Admin** (`phone_lines:webhooks`); de lo contrario, `403 PERMISSION_DENIED`.

Todos los endpoints de `/v1/workspace/webhooks` aceptan solo una clave **con alcance de tenant**: los webhooks de workspace pertenecen al workspace, no a un número de WhatsApp, por lo que una clave con alcance de número (o una autorización OAuth por número) recibe `403 NUMBER_SCOPE_NOT_ALLOWED` antes de que se evalúe cualquier rol. Un `403 PERMISSION_DENIED` / `WORKSPACE_MEMBERSHIP_REQUIRED` se envía con `Cache-Control: no-store`.

Estos son los **webhooks de workspace**, un registro separado de `/v1/webhooks`: reciben los eventos `phone_line.*` y `wallet.topup_paid`, y un webhook de número nunca recibe ninguno de ellos.

**Requiere una clave con alcance de tenant.**



## OpenAPI

````yaml openapi.es.json GET /v1/workspace/webhooks/{id}/deliveries
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/workspace/webhooks/{id}/deliveries:
    get:
      tags:
        - Workspace
      summary: Listar las entregas de un webhook
      description: >-
        **Webhooks de workspace**: el mismo registro que
        `/v1/phone-lines/webhooks` (mismas filas, secreto `plwh_`, firma,
        reintentos y entregas), con un conjunto de eventos más amplio: todos los
        eventos `phone_line.*` **más `wallet.topup_paid`** (se acreditó una
        recarga de la billetera). `"*"` significa solo todos los eventos de
        líneas telefónicas: `wallet.topup_paid` es opcional, inclúyelo por
        nombre (por ejemplo `["*", "wallet.topup_paid"]`). Esta superficie lista
        todos los webhooks del workspace. Clave con alcance de tenant (o clave
        de cuenta con `x-workspace-id`); Owner o Admin (`phone_lines:webhooks`)
        con una credencial de usuario.


        Devuelve `{ "deliveries": [ … ] }`: las últimas entregas del webhook,
        **las más recientes primero**, con su estado y resultado, **nunca su
        payload** (un `phone_line.code_received` lleva el código de activación;
        lee una entrega completa con `GET …/deliveries/{deliveryId}`). Un
        webhook de otro workspace responde **404 `WEBHOOK_NOT_FOUND`**, nunca
        una lista vacía.


        Permisos: con una clave de cuenta (`ps_account_`) o un token OAuth /
        MCP, el usuario debe ser **Owner o Admin** (`phone_lines:webhooks`); de
        lo contrario, `403 PERMISSION_DENIED`.


        Todos los endpoints de `/v1/workspace/webhooks` aceptan solo una clave
        **con alcance de tenant**: los webhooks de workspace pertenecen al
        workspace, no a un número de WhatsApp, por lo que una clave con alcance
        de número (o una autorización OAuth por número) recibe `403
        NUMBER_SCOPE_NOT_ALLOWED` antes de que se evalúe cualquier rol. Un `403
        PERMISSION_DENIED` / `WORKSPACE_MEMBERSHIP_REQUIRED` se envía con
        `Cache-Control: no-store`.


        Estos son los **webhooks de workspace**, un registro separado de
        `/v1/webhooks`: reciben los eventos `phone_line.*` y
        `wallet.topup_paid`, y un webhook de número nunca recibe ninguno de
        ellos.


        **Requiere una clave con alcance de tenant.**
      operationId: get_workspace_webhooks_id_deliveries
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          example: cmh1w8b2k0001wh8example3d
          description: >-
            El `id` del webhook (de `GET /v1/workspace/webhooks` o de la
            respuesta de creación).
        - name: limit
          in: query
          required: false
          description: >-
            De 1 a 200 (predeterminado 50). Cualquier otro valor (0, 201, un
            decimal, texto, vacío) → `400 INVALID_LIMIT`.
          schema:
            type: string
            description: (entero (1–200))
          example: '50'
        - name: x-workspace-id
          in: header
          required: false
          schema:
            type: string
          description: >-
            Solo con una clave de cuenta (`ps_account_`): el workspace sobre el
            que actuar, de `GET /v1/workspaces`. Sin él, una clave de cuenta
            recibe `400 WORKSPACE_ID_REQUIRED`.
          example: cmh2a9z8y0002ws8example1q
      responses:
        '200':
          description: Las últimas entregas
          content:
            application/json:
              schema:
                type: object
                properties:
                  deliveries:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: >-
                            El id de la entrega: el mismo `id` (y encabezado
                            `Idempotency-Key`) que recibió tu endpoint.
                          example: cmh1w9c4m0002dl8example5f
                        event:
                          type: string
                          example: phone_line.code_received
                        status:
                          type: string
                          enum:
                            - PENDING
                            - DELIVERED
                            - FAILED
                          description: >-
                            `PENDING` (aún en intentos), `DELIVERED` o `FAILED`
                            (intentos agotados, o el webhook fue pausado).
                          example: DELIVERED
                        attempts:
                          type: integer
                          description: Intentos hasta ahora (como máximo 6).
                          example: 1
                        responseStatus:
                          type:
                            - integer
                            - 'null'
                          description: >-
                            Estado HTTP del último intento, `null` cuando no
                            obtuvo respuesta HTTP.
                          example: 200
                        lastError:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Por qué falló el último intento, `null` cuando no
                            falló.
                          example: null
                        createdAt:
                          type: string
                          format: date-time
                          example: '2026-10-27T14:11:51.000Z'
                        deliveredAt:
                          type:
                            - string
                            - 'null'
                          format: date-time
                          example: '2026-10-27T14:11:52.000Z'
              example:
                deliveries:
                  - id: cmh1w9c4m0002dl8example5f
                    event: phone_line.code_received
                    status: DELIVERED
                    attempts: 1
                    responseStatus: 200
                    lastError: null
                    createdAt: '2026-10-27T14:11:51.000Z'
                    deliveredAt: '2026-10-27T14:11:52.000Z'
        '400':
          description: '`limit` no es un entero de 1 a 200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: >-
                  limit must be an integer between 1 and 200. | limit deve ser
                  um inteiro entre 1 e 200.
                code: INVALID_LIMIT
        '401':
          description: >-
            Credencial ausente o inválida (`x-api-key`, `x-api-key-id` o
            `Authorization: Bearer`). El cuerpo trae solo `error`, sin `code`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              examples:
                missing:
                  summary: No credential
                  value:
                    error: >-
                      Missing x-api-key, x-api-key-id or Authorization Bearer
                      token
                invalid:
                  summary: Invalid API key
                  value:
                    error: Invalid API key
        '403':
          description: >-
            Key limitada a un número (`NUMBER_SCOPE_NOT_ALLOWED`), token
            OAuth/MCP de un usuario que no es Owner ni Admin
            (`PERMISSION_DENIED`) o que ya no es miembro activo
            (`WORKSPACE_MEMBERSHIP_REQUIRED`), o workspace archivado
            (`WORKSPACE_ARCHIVED`). `TENANT_REQUIRED`: credencial no ligada a
            ningún workspace
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              examples:
                numberScope:
                  summary: Number-scoped key
                  value:
                    error: This endpoint requires a tenant-scoped API key
                    code: NUMBER_SCOPE_NOT_ALLOWED
                permissionDenied:
                  summary: OAuth/MCP user who is not Owner or Admin
                  value:
                    error: >-
                      Your workspace role does not allow this action
                      (phone_lines:webhooks).
                    code: PERMISSION_DENIED
                notMember:
                  summary: OAuth/MCP user no longer a member
                  value:
                    error: >-
                      The user behind this token is not an active member of this
                      workspace.
                    code: WORKSPACE_MEMBERSHIP_REQUIRED
                archived:
                  summary: Workspace archived
                  value:
                    error: >-
                      This workspace has been archived and its API is closed. |
                      Este workspace foi arquivado e sua API está encerrada.
                    code: WORKSPACE_ARCHIVED
                tenantRequired:
                  summary: Credential not bound to a workspace
                  value:
                    error: This credential is not bound to a workspace.
                    code: TENANT_REQUIRED
        '404':
          description: >-
            No existe ese webhook en tu workspace (`WEBHOOK_NOT_FOUND`); un
            webhook de otro workspace responde igual
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Webhook not found. | Webhook não encontrado.
                code: WEBHOOK_NOT_FOUND
        '500':
          description: Falla inesperada (`INTERNAL_ERROR`).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Unexpected error. | Erro inesperado.
                code: INTERNAL_ERROR
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.