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

# Handles `POST /v1/webhooks/deliveries/{delivery_id}/resend`.

> Sends the delivery's event again as a new delivery. `Idempotency-Key` is
required: a resend is a side effect on a customer's system, and a double
click or a retried request must produce one delivery, not two. Replaying a
key answers `200` with the delivery the first call made.

# Errors

`400` without `Idempotency-Key`, `401`, `403` without `WEBHOOKS_MANAGE`,
`404` for an unknown or another tenant's delivery, `409` when the endpoint
is disabled or gone (`WEBHOOK_ENDPOINT_DISABLED`,
`WEBHOOK_ENDPOINT_MISSING`), when the key is held by a request still
running (`RESEND_IN_PROGRESS`) or was used for a different delivery
(`IDEMPOTENCY_KEY_REUSED`), `503` when a store cannot be reached.



## OpenAPI

````yaml /openapi.json post /v1/webhooks/deliveries/{delivery_id}/resend
openapi: 3.1.0
info:
  title: Esectra API
  description: >-
    Transaction screening, identity verification, and wallet risk.


    Every create route accepts `Idempotency-Key`; replaying one returns the
    original record with `200` where the first call returned `201`. `POST
    /v1/transactions` requires the header, because a duplicated transaction is a
    duplicated financial record.
  license:
    name: proprietary
    identifier: proprietary
  version: 0.1.0
servers: []
security: []
paths:
  /v1/webhooks/deliveries/{delivery_id}/resend:
    post:
      tags:
        - Webhooks
      summary: Handles `POST /v1/webhooks/deliveries/{delivery_id}/resend`.
      description: >-
        Sends the delivery's event again as a new delivery. `Idempotency-Key` is

        required: a resend is a side effect on a customer's system, and a double

        click or a retried request must produce one delivery, not two. Replaying
        a

        key answers `200` with the delivery the first call made.


        # Errors


        `400` without `Idempotency-Key`, `401`, `403` without `WEBHOOKS_MANAGE`,

        `404` for an unknown or another tenant's delivery, `409` when the
        endpoint

        is disabled or gone (`WEBHOOK_ENDPOINT_DISABLED`,

        `WEBHOOK_ENDPOINT_MISSING`), when the key is held by a request still

        running (`RESEND_IN_PROGRESS`) or was used for a different delivery

        (`IDEMPOTENCY_KEY_REUSED`), `503` when a store cannot be reached.
      operationId: resend_delivery_handler
      parameters:
        - name: delivery_id
          in: path
          description: Delivery to send again
          required: true
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Required. Replaying it returns the delivery the first call made
          required: true
          schema:
            type: string
      responses:
        '200':
          description: >-
            The Idempotency-Key was already used for this delivery; this is what
            it made
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeliveryBody'
        '201':
          description: A new delivery of the same event, attempted once
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeliveryBody'
        '400':
          description: No Idempotency-Key
        '401':
          description: No usable credentials
        '403':
          description: The caller does not hold WEBHOOKS_MANAGE
        '404':
          description: This tenant has no such delivery
        '409':
          description: >-
            The endpoint is disabled or gone, the key is in use, or the key was
            used for another delivery
        '503':
          description: A backing store could not be reached
      security:
        - api_key: []
        - session_cookie: []
components:
  schemas:
    DeliveryBody:
      type: object
      description: A delivery as returned to a customer.
      required:
        - delivery_id
        - endpoint_id
        - event_id
        - event_type
        - subject_id
        - status
        - attempts
        - created_at
        - updated_at
      properties:
        attempts:
          type: integer
          format: int32
          description: Attempts made.
          minimum: 0
        created_at:
          type: string
          description: RFC 3339 creation timestamp.
        delivery_id:
          type: string
          description: Delivery identifier.
        endpoint_id:
          type: string
          description: Endpoint it was sent to.
        event_id:
          type: string
          description: Event identifier, stable across attempts.
        event_type:
          type: string
          description: Event name.
        last_error:
          type:
            - string
            - 'null'
          description: Why the last attempt failed.
        last_response_status:
          type:
            - integer
            - 'null'
          format: int32
          description: HTTP status of the last attempt.
          minimum: 0
        next_attempt_at:
          type:
            - string
            - 'null'
          description: When the next attempt is scheduled.
        requested_by:
          type:
            - string
            - 'null'
          description: Who asked for the resend; absent on a delivery the system made.
        resent_from_delivery_id:
          type:
            - string
            - 'null'
          description: The delivery this one re-sends, when a person asked for it again.
        status:
          $ref: '#/components/schemas/DeliveryStatus'
          description: How far the delivery got.
        subject_id:
          type: string
          description: Object the event was about.
        updated_at:
          type: string
          description: RFC 3339 time of the last change.
    DeliveryStatus:
      type: string
      description: How far a delivery has got.
      enum:
        - PENDING
        - DELIVERED
        - RETRYING
        - EXHAUSTED
  securitySchemes:
    api_key:
      type: http
      scheme: bearer
      description: >-
        A tenant API key. Acts for exactly one tenant and cannot conclude a
        case, because a conclusion records a person.
    session_cookie:
      type: apiKey
      in: cookie
      name: esectra_session
      description: >-
        A signed-in reviewer's session. httpOnly and SameSite=Lax; set by `POST
        /v1/control/sessions` and only usable once the second factor is met.

````

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