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

# Lista os webhooks NÃO confirmados (falha definitiva de entrega), para redisparo



## OpenAPI

````yaml /api-reference/openapi.json get /webhook-events
openapi: 3.1.0
info:
  title: UNIFOKAL API
  version: v1
  summary: >-
    Verificação de identidade: sessão criada no servidor, jornada no widget,
    resultado no webhook.
  description: >-
    A versão vive no caminho (/v1); não existe header de versão. Adição
    compatível (campo, módulo ou chave nova) NÃO sobe a versão: ignore o que não
    conhecer. Todo erro tem a forma { error, message }: o código é estável, a
    mensagem não. Ids são prefixo + ULID. Webhooks são assinados (HMAC SHA-256
    no header X-IDSAAS-Signature, janela de 300s; o segredo é SEU, mínimo 32
    caracteres) e o header x-idsaas-event carrega o tipo do evento.
  termsOfService: https://unifokal.com/termos
  contact:
    name: UNIFOKAL
    url: https://docs.unifokal.com/
servers:
  - url: https://api.unifokal.com/v1
security: []
externalDocs:
  description: >-
    Documentação completa em https://docs.unifokal.com/. Briefing para agentes
    de IA em https://unifokal.com/llms.txt.
  url: https://docs.unifokal.com/
paths:
  /webhook-events:
    get:
      summary: >-
        Lista os webhooks NÃO confirmados (falha definitiva de entrega), para
        redisparo
      operationId: listUndeliveredWebhookEvents
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 1000000
            default: 1
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
          description: Valores acima de 20 são reduzidos a 20 por página.
        - name: resource_id
          in: query
          required: false
          schema:
            type: string
            maxLength: 128
          description: >-
            Filtra pelos eventos de UM recurso. Sem ele, a listagem responde
            exatamente como sempre respondeu.
        - name: cursor
          in: query
          required: false
          schema:
            type: string
            maxLength: 200
          description: >-
            O next_cursor da resposta anterior. Com ele, a página segue de onde
            a anterior parou, sem contagem e sem repetir evento quando chegam
            falhas novas (a resposta passa a ser WebhookEventCursorPage); page é
            ignorado. Cursor inválido é 400 invalid_cursor. Recomendado para
            varrer a lista inteira.
      responses:
        '200':
          description: >-
            Entregas com falha DEFINITIVA no ambiente da chave (sandbox e
            produção nunca se cruzam).
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/WebhookEventList'
                  - $ref: '#/components/schemas/WebhookEventCursorPage'
        '400':
          description: >-
            Códigos estáveis: validation_error, invalid_cursor. Ramifique pelo
            campo error, nunca pela mensagem.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ErrorEnvelope'
                  - properties:
                      error:
                        enum:
                          - validation_error
                          - invalid_cursor
        '401':
          description: >-
            Códigos estáveis: invalid_api_key. Ramifique pelo campo error, nunca
            pela mensagem.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ErrorEnvelope'
                  - properties:
                      error:
                        enum:
                          - invalid_api_key
        '403':
          description: >-
            Códigos estáveis: credential_type_not_allowed,
            organization_suspended, test_key_used_in_production. Ramifique pelo
            campo error, nunca pela mensagem.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ErrorEnvelope'
                  - properties:
                      error:
                        enum:
                          - credential_type_not_allowed
                          - organization_suspended
                          - test_key_used_in_production
      security:
        - secretKey: []
components:
  schemas:
    WebhookEventList:
      type: object
      description: A resposta sem cursor (a de sempre), com next_cursor quando há mais.
      required:
        - data
        - page
        - totalPages
        - totalItems
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/UndeliveredWebhookEvent'
        page:
          type: integer
        totalPages:
          type: integer
        totalItems:
          type: integer
        next_cursor:
          type:
            - string
            - 'null'
          description: >-
            Passe em cursor para seguir por cursor a partir desta página; null
            quando não há mais. O conteúdo é opaco e não é contrato: pode mudar
            sem aviso.
    WebhookEventCursorPage:
      type: object
      description: >-
        A resposta com cursor: a página segue de onde a anterior parou, sem
        contagem.
      required:
        - data
        - next_cursor
        - has_more
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/UndeliveredWebhookEvent'
        next_cursor:
          type:
            - string
            - 'null'
          description: >-
            Passe em cursor para a página seguinte; null na última. Opaco e não
            é contrato: pode mudar sem aviso.
        has_more:
          type: boolean
          description: Se existe página seguinte.
    ErrorEnvelope:
      type: object
      description: >-
        Todo erro da API tem exatamente esta forma. O campo error é um código
        estável (contrato); message é texto livre e pode mudar sem aviso.
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: Código estável do erro. Ramifique por ele.
        message:
          type: string
          description: Texto explicativo. NÃO é contrato.
      additionalProperties: false
    UndeliveredWebhookEvent:
      type: object
      description: >-
        Um webhook cujo ciclo de entrega terminou SEM confirmação 2xx do seu
        servidor.
      required:
        - event_type
        - verification_id
        - resource_id
        - reference_id
        - target_url
        - status
        - status_code
        - attempts
        - failed_at
      properties:
        event_type:
          type: string
          enum:
            - completed
            - blocked
            - failed
            - pending
            - monitoring
            - test
            - pix_device_revoked
            - subject_erased
            - verification_link_claimed
            - passkey_bound
            - passkey_revoked
            - act_rejected
            - pld_alert_created
            - user_created
            - user_updated
            - user_deleted
            - user_locked
            - user_unlocked
            - auth_suspicious_sign_in
            - auth_refresh_reuse_detected
            - auth_compromised_password
        verification_id:
          oneOf:
            - $ref: '#/components/schemas/VerificationId'
            - type: 'null'
        resource_id:
          type:
            - string
            - 'null'
          description: >-
            Identificador do recurso deste evento quando ele não pertence a uma
            verificação. É a chave aceita pelo replay.
        reference_id:
          type:
            - string
            - 'null'
        target_url:
          type: string
          description: >-
            Host do destino desta entrega. O endereco completo do seu webhook
            nao volta em resposta de leitura: ele aparece so para quem
            administra os endpoints, no painel.
        status:
          type: string
          const: error
        status_code:
          type:
            - integer
            - 'null'
        attempts:
          type: integer
        failed_at:
          type:
            - string
            - 'null'
          format: date-time
    VerificationId:
      type: string
      pattern: ^ver_[0-9A-HJKMNP-TV-Z]{26}$
      description: Id da verificação (ver_ + ULID), o identificador que o webhook carrega.
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      description: >-
        Chave secreta (unifokal_live_ em produção, unifokal_test_ no sandbox: 64
        hex mais CRC-32) no Authorization: Bearer. Só no seu servidor: nunca no
        browser ou app (o widget monta apenas com o id vs_ da sessão). Não
        existe chave publishable.

````

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