# Send a delivery again

`POST /webhooks/{id}/deliveries/{did}/redeliver`

Requires the `businesses` scope.

Queues a NEW delivery of the same event to the same endpoint, attempted now and retried on the normal schedule; the original keeps its history. For an endpoint that was down or a handler that had a bug: fix it, then replay. Refused while the endpoint is paused or auto-disabled.

## Path parameters

| Name | Type | | Description |
|---|---|---|---|
| `id` | string | **required** | Webhook endpoint id. |
| `did` | string | **required** | Delivery id. |

## Response

`201`: `{ "ok": true, … }`

| Field | Type | | Description |
|---|---|---|---|
| `ok` | boolean | **required** |  |
| `delivery` | WebhookDelivery | **required** | One attempt-tracked event delivery. The wire envelope carries this row's `id`. Dedupe on it. |
| `redeliveryOf` | string |  | The delivery that was replayed. |

Errors: `400`, `401`, `403`, `404`, `429`. Every failure answers `{ "error", "reason", "hint", "param", "doc_url", "retryable", "request_id" }`: branch on `reason`, and read `hint` for what to change (https://docs.billos.co.il/errors.md).

## Examples

### cURL

```bash
curl -X POST "$BASE/webhooks/$DOC_ID/deliveries/{did}/redeliver" \
  -H "X-Api-Key: $KEY"
```
### Node

```node
const res = await fetch(`${BASE}/webhooks/${DOC_ID}/deliveries/{did}/redeliver`, {
  method: 'POST',
  headers: {
    'X-Api-Key': KEY,
  },
})
const data = await res.json()
if (!data.ok) throw new Error(data.reason)
```
### Python

```python
import requests
res = requests.post(
    f"{BASE}/webhooks/{DOC_ID}/deliveries/{did}/redeliver",
    headers={"X-Api-Key": KEY},
)
data = res.json()
```