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

# Listar webhooks

> Lista todos los webhooks de un canal

export const EnterpriseText = ({lang = 'pt'}) => ({
  pt: <>Este endpoint requer a role <strong>ENTERPRISE</strong> na sua conta.</>,
  en: <>This endpoint requires the <strong>ENTERPRISE</strong> role on your account.</>,
  es: <>Este endpoint requiere el rol <strong>ENTERPRISE</strong> en tu cuenta.</>
})[lang];

## Conceptos

Devuelve todos los webhooks registrados en un canal. El campo `auth.configured` indica si hay credenciales de autenticación definidas, pero las credenciales en sí **no se devuelven** por seguridad.

El campo `secret` (firma HMAC) tampoco **se devuelve** en el listado: solo está disponible en el momento de la creación o de la actualización con `signing: true`.

<Note>
  <EnterpriseText lang="es" />
</Note>


## OpenAPI

````yaml es/webhooks/openapi.json GET /v1/channels/{channelId}/webhooks
openapi: 3.1.0
info:
  title: Omni Z-API - API de webhooks
  description: >-
    API para crear y gestionar endpoints de webhook por canal. Requiere el rol
    ENTERPRISE.
  version: 1.0.0
servers:
  - url: https://api.omni.z-api.io
security:
  - bearerAuth: []
paths:
  /v1/channels/{channelId}/webhooks:
    get:
      tags:
        - Webhooks
      summary: Listar webhooks
      description: >-
        Devuelve todos los webhooks registrados en el canal. Las credenciales de
        autenticación y el `secret` HMAC no se devuelven por seguridad.
      operationId: listWebhooks
      parameters:
        - name: channelId
          in: path
          required: true
          description: ID del canal
          schema:
            type: string
            example: 019E4C54B1B375A28970B605CA9B03C3
      responses:
        '200':
          description: Lista de webhooks del canal
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WebhookResponse'
              example:
                - id: A1B2C3D4E5F6789012345678901234AB
                  channelId: 019E4C54B1B375A28970B605CA9B03C3
                  instanceId: 019E4C54B1B375A28970B605CA9B03C3
                  url: https://app.suempresa.com/webhooks/omni-zapi
                  description: Webhook principal de producción
                  events:
                    - MESSAGE_RECEIVED
                    - MESSAGE_STATUS
                  status: ENABLED
                  signing: true
                  auth:
                    type: BEARER
                    configured: true
                  payloadFormat: DEFAULT
                  customAttributes: {}
                  createdAt: 2025-01-15T10:30:00.000+0000
                  updatedAt: 2025-01-15T10:30:00.000+0000
                - id: B2C3D4E5F6789012345678901234AB12
                  channelId: 019E4C54B1B375A28970B605CA9B03C3
                  instanceId: 019E4C54B1B375A28970B605CA9B03C3
                  url: https://app.suempresa.com/webhooks/eventos-conexion
                  description: Eventos de conexión
                  events:
                    - CONNECTED
                    - DISCONNECTED
                  status: ENABLED
                  signing: false
                  auth:
                    type: NONE
                    configured: false
                  payloadFormat: DEFAULT
                  customAttributes: {}
                  createdAt: 2025-01-16T08:00:00.000+0000
                  updatedAt: 2025-01-16T08:00:00.000+0000
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          description: 'Regla de negocio incumplida: cuenta sin el rol ENTERPRISE'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: 422
                message: This action requires ENTERPRISE role
components:
  schemas:
    WebhookResponse:
      type: object
      properties:
        id:
          type: string
          description: ID único del webhook
          example: A1B2C3D4E5F6789012345678901234AB
        channelId:
          type: string
          description: ID del canal al que pertenece el webhook
          example: 019E4C54B1B375A28970B605CA9B03C3
        instanceId:
          type: string
          deprecated: true
          description: 'Obsoleto: usa `channelId`'
          example: 019E4C54B1B375A28970B605CA9B03C3
        url:
          type: string
          description: URL de destino de los eventos
          example: https://app.suempresa.com/webhooks/omni-zapi
        description:
          type: string
          nullable: true
          description: Descripción del webhook
          example: Webhook principal de producción
        events:
          type: array
          description: Tipos de evento configurados
          items:
            type: string
          example:
            - MESSAGE_RECEIVED
            - MESSAGE_STATUS
        status:
          type: string
          enum:
            - ENABLED
            - DISABLED
          description: Estado actual del webhook
          example: ENABLED
        signing:
          type: boolean
          description: Indica si la firma HMAC está habilitada
          example: true
        auth:
          $ref: '#/components/schemas/WebhookAuthInfo'
        payloadFormat:
          type: string
          enum:
            - DEFAULT
            - Z_API
            - CHATWOOT
          description: Formato del payload entregado
          example: DEFAULT
        customAttributes:
          type: object
          additionalProperties: true
          description: Atributos extra configurados
          example: {}
        createdAt:
          type: string
          format: date-time
          description: Fecha de creación
          example: 2025-01-15T10:30:00.000+0000
        updatedAt:
          type: string
          format: date-time
          description: Fecha de la última actualización
          example: 2025-01-15T10:30:00.000+0000
    Error:
      type: object
      properties:
        error:
          type: integer
        message:
          type: string
    WebhookAuthInfo:
      type: object
      description: >-
        Resumen de la autenticación configurada: las credenciales no se
        devuelven por seguridad
      properties:
        type:
          type: string
          enum:
            - NONE
            - BEARER
            - API_KEY
            - BASIC
            - CUSTOM_HEADER
          example: BEARER
        configured:
          type: boolean
          description: '`true` cuando hay credenciales configuradas'
          example: true
  responses:
    Unauthorized:
      description: Token no válido o ausente.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 401
            message: Unauthorized
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Secret Key generada en el panel de Seguridad de Omni Z-API

````