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

# List unsuccessful webhook deliveries

> Returns a webhook's failed or unknown-outcome deliveries, latest first. Successful and in-flight deliveries are not listed. Records are removed once they expire. A record first appears only after delivery has been attempted. It is marked unknown if no outcome is recorded within 2 minutes of the attempt. Deliveries are queued and may be attempted at a time after their created_at timestamp. A record could thus appear behind other records containing a later created_at. A polling mechanism that relies on advancing a created_after watermark may miss such records. To ensure that every record is collected, page through the entire list and skip ids that have already been seen. Records do not include Prequel webhook signature headers, so a handler that verifies webhook signatures will reject a replayed event_message.



## OpenAPI

````yaml /generated/openapi-generated-2023-12-01.json get /webhooks/{webhook_id}/deliveries
openapi: 3.1.0
info:
  title: Prequel Data Export
  description: Data Export API spec
  version: '2023-12-01'
servers:
  - url: https://api.prequel.co
    description: Cloud-hosted server (US)
  - url: https://eu-api.prequel.co
    description: Cloud-hosted server (EU)
  - url: https://{custom_host}/
    description: Cloud-prem or shared-cloud server
security:
  - ApiKeyAuth: []
paths:
  /webhooks/{webhook_id}/deliveries:
    get:
      tags:
        - Webhooks
      summary: List unsuccessful webhook deliveries
      description: >-
        Returns a webhook's failed or unknown-outcome deliveries, latest first.
        Successful and in-flight deliveries are not listed. Records are removed
        once they expire. A record first appears only after delivery has been
        attempted. It is marked unknown if no outcome is recorded within 2
        minutes of the attempt. Deliveries are queued and may be attempted at a
        time after their created_at timestamp. A record could thus appear behind
        other records containing a later created_at. A polling mechanism that
        relies on advancing a created_after watermark may miss such records. To
        ensure that every record is collected, page through the entire list and
        skip ids that have already been seen. Records do not include Prequel
        webhook signature headers, so a handler that verifies webhook signatures
        will reject a replayed event_message.
      operationId: list-unsuccessful-webhook-deliveries
      parameters:
        - name: webhook_id
          in: path
          required: true
          description: Webhook ID.
          schema:
            type: string
        - name: status
          in: query
          required: false
          description: Delivery status to filter by. Returns both when omitted.
          schema:
            type: string
            enum:
              - error
              - unknown
        - name: status_code
          in: query
          required: false
          description: HTTP status the endpoint returned, such as 503.
          schema:
            type: integer
        - name: event_type
          in: query
          required: false
          description: Event type to filter deliveries by, such as transfer.error.
          schema:
            type: string
        - name: created_after
          in: query
          required: false
          description: >-
            Filter to items with created_at greater than or equal to (inclusive)
            this RFC3339 timestamp.
          schema:
            type: string
        - name: created_before
          in: query
          required: false
          description: >-
            Filter to items with created_at less than (exclusive) this RFC3339
            timestamp.
          schema:
            type: string
        - name: page_size
          in: query
          required: false
          description: Number of items to return per page.
          schema:
            type: integer
        - name: order
          in: query
          required: false
          description: Sort order for items
          schema:
            type: string
            enum:
              - asc
              - desc
        - name: cursor
          in: query
          required: false
          description: >-
            Used for pagination - represents last page seen. Value is included
            in response when there is a next page.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    const: success
                  data:
                    $ref: >-
                      #/components/schemas/ListUnsuccessfulWebhookDeliveryResponse
                    $schema: https://json-schema.org/draft/2020-12/schema
                    $id: >-
                      https://github.com/prequel-co/datafeed/internal/shared/api/models/list-unsuccessful-webhook-delivery-response
                  message:
                    type: string
                  has_next:
                    type: boolean
                    description: Whether there are more items beyond this page.
                  next_url:
                    type: string
                    description: >-
                      Full URL to fetch the next page. Only present when
                      has_next is true.
                type: object
                required:
                  - status
                  - data
                  - message
                  - has_next
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ListUnsuccessfulWebhookDeliveryResponse:
      properties:
        deliveries:
          items:
            $ref: '#/components/schemas/UnsuccessfulWebhookDelivery'
          type: array
      additionalProperties: false
      type: object
      required:
        - deliveries
    UnsuccessfulWebhookDelivery:
      properties:
        id:
          type: string
          description: Delivery ID.
        webhook_id:
          type: string
          description: ID of the webhook.
        event_id:
          type: string
          description: >-
            ID of the webhook event: the transfer for a transfer event, or the
            audit log entry for any other event.
        event_type:
          type: string
          examples:
            - transfer.error
        status:
          type: string
          enum:
            - error
            - unknown
          description: >-
            error means the delivery failed. unknown means Prequel attempted the
            delivery and has no recorded outcome.
        created_at:
          type: string
          format: date-time
          description: >-
            When Prequel queued the event for this webhook. The list sorts on
            this field.
        attempted_at:
          type: string
          format: date-time
          description: When Prequel attempted the delivery.
        errored_at:
          oneOf:
            - type: string
              format: date-time
              description: When Prequel recorded the error. Null when status is unknown.
            - type: 'null'
        expires_at:
          type: string
          format: date-time
          description: >-
            When the record expires and leaves the API: attempted_at plus the
            expiry window, 7 days by default.
        error:
          oneOf:
            - $ref: '#/components/schemas/WebhookDeliveryError'
              description: Why the delivery failed. Null when status is unknown.
            - type: 'null'
        event_message:
          oneOf:
            - type: object
              description: >-
                The event is stored as a generic_post webhook. Slack, PagerDuty,
                or Datadog endpoint received a different rendering. Key order
                can differ from the body that was sent, and the record no
                headers. Null when the event failed to compose.
            - type: 'null'
      additionalProperties: false
      type: object
      required:
        - id
        - webhook_id
        - event_id
        - event_type
        - status
        - created_at
        - attempted_at
        - errored_at
        - expires_at
        - error
        - event_message
    ErrorResponse:
      properties:
        status:
          type: string
          const: error
        message:
          type: string
        data:
          type: 'null'
      type: object
      required:
        - status
        - message
    WebhookDeliveryError:
      properties:
        type:
          type: string
          enum:
            - http_status
            - transport
            - internal
          description: >-
            http_status means the endpoint answered with a non-2xx status.
            transport means the request failed before an answer arrived, such as
            a timeout or a refused connection. internal means Prequel could not
            build or send the request.
        status_code:
          type: integer
          description: >-
            The HTTP status the endpoint returned. Present only when type is
            http_status.
          examples:
            - 503
        response_body:
          type: string
          description: >-
            The body the endpoint returned, cut to 4096 bytes and ending in ...
            when longer. NUL bytes and invalid UTF-8 are removed. Present only
            when type is http_status.
        message:
          type: string
          description: >-
            What went wrong. Present only when type is transport or internal. An
            internal error always carries the same message.
      additionalProperties: false
      type: object
      required:
        - type
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````

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