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

# Retry a webhook delivery

> Manually requeue a failed webhook delivery while the encrypted payload is still retained.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/webhooks/deliveries/{delivery_id}/retry
openapi: 3.1.0
info:
  title: Kayle ID
  version: 1.5.0
  description: Privacy-first identity verification.
  license:
    name: Apache License 2.0
    url: https://github.com/kayleai/kayle-id/blob/main/LICENSE
  contact:
    name: Kayle ID
    url: https://kayle.id
    email: help@kayle.id
  termsOfService: https://kayle.id/terms
servers:
  - url: http://127.0.0.1:8787
    description: ''
security:
  - bearerAuth: []
paths:
  /v1/webhooks/deliveries/{delivery_id}/retry:
    post:
      tags:
        - Webhooks
      summary: Retry a webhook delivery
      description: >-
        Manually requeue a failed webhook delivery while the encrypted payload
        is still retained.
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 128
            pattern: ^[A-Za-z0-9_-]+$
            description: The ID of the webhook delivery to retry (e.g. whd_...).
          required: true
          description: The ID of the webhook delivery to retry (e.g. whd_...).
          name: delivery_id
          in: path
      responses:
        '200':
          description: Webhook delivery requeued for retry.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Webhook Delivery'
                  error:
                    type: 'null'
                required:
                  - data
                  - error
        '404':
          description: Webhook delivery not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: 'null'
                    description: Empty data object.
                  error:
                    type:
                      - object
                      - 'null'
                    properties:
                      code:
                        type: string
                        description: The error code
                      message:
                        type: string
                        description: The error message
                      hint:
                        type: string
                        description: A hint to help the user fix the error
                      docs:
                        type: string
                        description: A link to the documentation for the error
                    required:
                      - code
                      - message
                      - hint
                      - docs
                required:
                  - data
                  - error
                example:
                  data: null
                  error:
                    code: NOT_FOUND
                    message: Webhook delivery not found.
                    hint: The webhook delivery with the given ID was not found.
                    docs: https://kayle.id/docs/api/webhooks/deliveries#retry
        '409':
          description: Webhook delivery cannot be retried.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: 'null'
                    description: Empty data object.
                  error:
                    type:
                      - object
                      - 'null'
                    properties:
                      code:
                        type: string
                        description: The error code
                      message:
                        type: string
                        description: The error message
                      hint:
                        type: string
                        description: A hint to help the user fix the error
                      docs:
                        type: string
                        description: A link to the documentation for the error
                    required:
                      - code
                      - message
                      - hint
                      - docs
                required:
                  - data
                  - error
                example:
                  data: null
                  error:
                    code: CONFLICT
                    message: Webhook delivery cannot be retried.
                    hint: >-
                      The webhook delivery is already in progress, or the
                      encrypted payload has expired and cannot be replayed.
                    docs: https://kayle.id/docs/api/webhooks/deliveries#retry
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: 'null'
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - INTERNAL_SERVER_ERROR
                      message:
                        type: string
                        enum:
                          - Internal server error.
                      hint:
                        type: string
                        enum:
                          - The server encountered an error.
                      docs:
                        type: string
                        enum:
                          - https://kayle.id/docs/api/errors
                    required:
                      - code
                      - message
                      - hint
                      - docs
                required:
                  - data
                  - error
      security:
        - bearerAuth: []
components:
  schemas:
    Webhook Delivery:
      type: object
      properties:
        id:
          type: string
          description: Webhook delivery ID
        event_id:
          type: string
          description: Event ID
        webhook_endpoint_id:
          type: string
          description: The ID of the webhook endpoint this delivery targets
        webhook_encryption_key_id:
          type:
            - string
            - 'null'
          description: >-
            The ID of the encryption key used to encrypt the payload for this
            delivery
        status:
          type: string
          enum:
            - pending
            - delivering
            - succeeded
            - failed
          description: The status of the webhook delivery
        attempt_count:
          type: number
          description: The number of attempts made to deliver the webhook
        next_attempt_at:
          type:
            - string
            - 'null'
          description: >-
            The next time this delivery should be attempted, or null if ready to
            send.
        payload_expires_at:
          type:
            - string
            - 'null'
          description: When the encrypted payload expires for manual retry/replay.
        payload_scrubbed_at:
          type:
            - string
            - 'null'
          description: When the encrypted payload was scrubbed, if no longer stored.
        payload_retention_reason:
          type:
            - string
            - 'null'
          enum:
            - pending_delivery
            - delivered
            - terminal_failure_retention
            - expired
            - no_active_key
            - jwe_creation_failed
            - privacy_request
          description: Why the payload is retained or why it was scrubbed.
        last_status_code:
          type:
            - number
            - 'null'
          description: The last HTTP status code received from the endpoint, if any.
        last_attempt_at:
          type:
            - string
            - 'null'
          description: The time the last delivery attempt was made, if any.
        created_at:
          type: string
          description: The time the delivery was created
        updated_at:
          type: string
          description: The time the delivery was last updated
      required:
        - id
        - event_id
        - webhook_endpoint_id
        - webhook_encryption_key_id
        - status
        - attempt_count
        - next_attempt_at
        - payload_expires_at
        - payload_scrubbed_at
        - payload_retention_reason
        - last_status_code
        - last_attempt_at
        - created_at
        - updated_at
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````