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

# POST /v1/webhook_endpoints/{webhook_id}/deliveries/{delivery_id}/replay

> Replay a stored webhook delivery attempt by re-emitting its source event to the endpoint

Replay a stored webhook delivery attempt by re-emitting its source event to the endpoint

<Info>
  Audience: application and admin.
</Info>

## Explicit replay

Replay re-emits the stored source event to the endpoint and returns the new recorded attempt or attempts with `replayedFromDeliveryId`. An unknown source attempt returns `404 webhook_delivery_not_found`; other replay failures return `500 webhook_delivery_replay_failed`. Use it after correcting the receiver or endpoint configuration. It is an explicit action, not evidence that failed deliveries are automatically retried.

## Canonical metadata

* `requestId`
* `traceparent`

## Example request

<RequestExample>
  ```bash theme={null}
  curl -X POST \
    -H "Authorization: Bearer $SECAPI_BEARER_TOKEN" \
    -H "secapi-version: 2026-03-19" \
    -H "content-type: application/json" \
    -d '{}' \
    "https://api.secapi.ai/v1/webhook_endpoints/wh_example_123/deliveries/wdel_example_123/replay"
  ```
</RequestExample>

<Info>
  This organization control-plane action accepts bearer organization REST authentication. API keys cannot mutate webhook endpoints. The dashboard is optional.
</Info>

## Example response

<ResponseExample>
  ```json theme={null}
  {
    "object": "webhook_delivery_replay",
    "sourceDeliveryId": "wdel_2ZK8Q1W9F4M6P7R3",
    "eventId": "evt_webhook_test_123",
    "deliveries": [
      {
        "kind": "webhook_delivery",
        "deliveryId": "wdel_2ZK8Q1W9F4M6P7R4",
        "recordedAt": "2026-06-25T15:05:00.250Z",
        "orgId": "org_example_123",
        "eventId": "evt_webhook_test_123",
        "eventType": "webhook.test",
        "webhookId": "wh_2ZK8Q1W9F4M6P7R3",
        "destinationUrl": "https://example.com/hooks/secapi",
        "status": 200,
        "ok": true,
        "requestId": "req_2ZK8Q1W9F4M6P7R3",
        "error": null,
        "latencyMs": 250,
        "replayedFromDeliveryId": "wdel_2ZK8Q1W9F4M6P7R3"
      }
    ],
    "eventsReplayed": 1
  }
  ```
</ResponseExample>

## Give this prompt to your agent

<Prompt>
  Replay the stored source event with bearer organization REST authentication; it creates new recorded attempts for the same endpoint. API keys cannot mutate webhook endpoints; the dashboard is optional.
</Prompt>

## Failure posture

* treat non-2xx responses as contract-aware failures, not free-form errors
* preserve `requestId` and `traceparent` in logs and downstream reports
* if provenance or freshness metadata is present, return it unchanged so trust is not lost in the handoff
