# Retry a webhook delivery

`POST https://api.morevoice.ai/v1/webhook_deliveries/{id}/retry`

Sends the delivery again right now (a dead one too) and returns it with the outcome. A retry that fails leaves a dead delivery dead; a delivery still being retried keeps its schedule.

Authenticate with a secret API key: `Authorization: Bearer $MOREVOICE_API_KEY`.

Operation ID: `webhook_deliveries_retry`.

## Parameters

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | A webhook delivery ID (`whd_…`). |

### Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `MoreVoice-Version` | `string` | no | The API version to use for this request. Defaults to the version the API key is pinned to. |
| `Idempotency-Key` | `string` | no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |

## Responses

### 200 OK

OK Returns `WebhookDelivery`.

| Field | Type | Description |
| --- | --- | --- |
| `id` | `string` | A webhook delivery ID (prefix `whd_`). |
| `object` | `"webhook_delivery"` | — |
| `endpoint_id` | `string` | A webhook endpoint ID (prefix `we_`). |
| `event_id` | `string` | A event ID (prefix `evt_`). |
| `event_type` | `string \| null` | — |
| `status` | `"pending" \| "failed" \| "succeeded" \| "dead"` | `pending`: not sent yet. `failed`: the last attempt failed; retried at `next_attempt_at` (for up to 72 hours). `succeeded`: answered 2xx. `dead`: given up. |
| `attempts` | `integer` | — |
| `next_attempt_at` | `string \| null` | — |
| `last_attempt_at` | `string \| null` | — |
| `delivered_at` | `string \| null` | — |
| `response_status` | `integer \| null` | — |
| `response_excerpt` | `string \| null` | The first 2 KB of the endpoint's last answer. |
| `duration_ms` | `integer \| null` | How long the last attempt took. |
| `error` | `string \| null` | — |
| `livemode` | `boolean` | `true` in live mode, `false` in test mode. |
| `created` | `string` | An ISO-8601 timestamp in UTC. |
| `request` | `object` | The request as last sent (retrieve only). |
| `request.url` | `string` | — |
| `request.method` | `"POST"` | — |
| `request.headers` | `Record<string, string>` | The headers of the last attempt, without the signatures. |
| `request.body` | `string \| null` | The exact body (the same on every attempt); null when the event has expired. |

Example:

```json
{
  "attempts": 2,
  "created": "2026-11-03T09:14:22.000Z",
  "delivered_at": null,
  "duration_ms": 412,
  "endpoint_id": "we_4Gk2LmN9pQ4rS6tV8wX0yZ",
  "error": "HTTP 503",
  "event_id": "evt_3fT9kq2ZpLr8YwVbN1cX0a",
  "event_type": "call.ended",
  "id": "whd_2N5bQ8",
  "last_attempt_at": "2026-11-03T09:14:42.000Z",
  "livemode": true,
  "next_attempt_at": "2026-11-03T09:15:02.000Z",
  "object": "webhook_delivery",
  "response_excerpt": "Service Unavailable",
  "response_status": 503,
  "status": "failed"
}
```

### 400 Bad Request

The request is invalid: a parameter is missing, malformed or unknown, or the version header is unknown. Returns `ErrorEnvelope`.

### 401 Unauthorized

No valid API key was sent. Returns `ErrorEnvelope`.

### 403 Forbidden

The key may not do this (a missing scope, a plan limit, or a compliance block). Returns `ErrorEnvelope`.

### 404 Not Found

No object with this ID (in the path or the body) exists in this organisation and mode. Returns `ErrorEnvelope`.

### 409 Conflict

The request conflicts with the object's state, or the Idempotency-Key was reused with other parameters. Returns `ErrorEnvelope`.

### 429 Too Many Requests

Too many requests, or no call capacity right now. Retry after the Retry-After delay. Returns `ErrorEnvelope`.

### 500 Internal Server Error

Something went wrong on MoreVoice's side. Retry with the same Idempotency-Key. Returns `ErrorEnvelope`.

## Code samples

**TypeScript**

```ts
import MoreVoice from "@morevoice/sdk";

const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment

const webhookDelivery = await mv.webhookDeliveries.retry("whd_7Hk2Lm9Qp");
console.log(webhookDelivery);
```

**Python**

```python
from morevoice import MoreVoice

client = MoreVoice()  # MOREVOICE_API_KEY from the environment

webhook_delivery = client.webhook_deliveries.retry("whd_7Hk2Lm9Qp")
print(webhook_delivery)
```

**cURL**

```sh
curl -X POST https://api.morevoice.ai/v1/webhook_deliveries/whd_7Hk2Lm9Qp/retry \
  -H "Authorization: Bearer $MOREVOICE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```
