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

# Replay Webhook Delivery

> Re-send a past webhook delivery to your endpoint: the exact same body, signed with your current secret, to your current URL.

Re-sends the stored request body **byte for byte** to the webhook's **current** URL, signed with the webhook's **current** secret. Use it after fixing an endpoint that was down.

The replay carries the original `X-Tuco-Event-Id` (so you can tell it is the same event), a new `X-Tuco-Delivery-Id`, and `X-Tuco-Replay: true`. It is recorded as a new delivery with `isReplayOf` pointing at the original. Replaying a replay points at the original too.

## Authentication

```bash theme={null}
Authorization: Bearer tuco_xxxxxxxxxxxxx
```

## Path parameters

<ParamField path="id" type="string" required>
  Webhook ID.
</ParamField>

<ParamField path="deliveryId" type="string" required>
  Delivery `id` to re-send.
</ParamField>

## Response

<ResponseField name="success" type="boolean">Your endpoint returned 2xx.</ResponseField>
<ResponseField name="deliveryId" type="string">Id of the new delivery record.</ResponseField>
<ResponseField name="isReplayOf" type="string">Id of the original delivery.</ResponseField>
<ResponseField name="responseStatus" type="number | null">Your endpoint's HTTP status.</ResponseField>
<ResponseField name="error" type="string | null">Why it failed.</ResponseField>
<ResponseField name="latencyMs" type="number">Total time including any retry.</ResponseField>
<ResponseField name="attemptCount" type="number">1 or 2.</ResponseField>

| Status | When |
| - | - |
| `200` | Replayed and your endpoint returned 2xx |
| `502` | Replayed, but your endpoint did not return 2xx |
| `401` | Missing or invalid API key |
| `402` | Workspace is read-only (billing) |
| `404` | Webhook or delivery not found in your workspace |
| `409` | Webhook is inactive. Activate it first. |

## Example

```bash theme={null}
curl -X POST "https://app.tuco.ai/api/webhooks/680a1b2c3d4e5f6789012345/deliveries/6ad14a1e2f9c4b0012ab34cd/replay" \
  -H "Authorization: Bearer tuco_xxxxxxxxxxxxx"
```

```json theme={null}
{
  "success": true,
  "deliveryId": "6ad14b9a2f9c4b0012ab34d1",
  "isReplayOf": "6ad14a1e2f9c4b0012ab34cd",
  "responseStatus": 200,
  "error": null,
  "latencyMs": 184,
  "attemptCount": 1
}
```


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