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

# Get unsuccessful webhook delivery

> Returns one failed or unknown delivery of a webhook. A delivery that succeeded, is still in flight, has expired, or belongs to another webhook returns 404.



## OpenAPI

````yaml /generated/openapi-generated-2023-12-01.json get /webhooks/{webhook_id}/deliveries/{delivery_id}
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/{delivery_id}:
    get:
      tags:
        - Webhooks
      summary: Get unsuccessful webhook delivery
      description: >-
        Returns one failed or unknown delivery of a webhook. A delivery that
        succeeded, is still in flight, has expired, or belongs to another
        webhook returns 404.
      operationId: get-unsuccessful-webhook-delivery
      parameters:
        - name: webhook_id
          in: path
          required: true
          description: Webhook ID.
          schema:
            type: string
        - name: delivery_id
          in: path
          required: true
          description: Webhook delivery ID.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    const: success
                  data:
                    $ref: '#/components/schemas/UnsuccessfulWebhookDeliveryResponse'
                    $schema: https://json-schema.org/draft/2020-12/schema
                    $id: >-
                      https://github.com/prequel-co/datafeed/internal/shared/api/models/unsuccessful-webhook-delivery-response
                  message:
                    type: string
                type: object
                required:
                  - status
                  - data
                  - message
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    UnsuccessfulWebhookDeliveryResponse:
      properties:
        delivery:
          $ref: '#/components/schemas/UnsuccessfulWebhookDelivery'
      additionalProperties: false
      type: object
      required:
        - delivery
    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.