# Resend a delivery

Source: https://docs.coderhelm.com/api/reference/webhook-endpoints/resend-webhook-delivery

`POST /api/webhooks/endpoints/{endpoint_id}/deliveries/{delivery_id}/resend`

Sends the same event (the same body and `webhook-id`, signed now) to the endpoint once more and adds the attempt to the delivery. Works on any delivery whose event is still kept (14 days), delivered or not.

## Authentication

A team API key: `Authorization: Bearer chk_...`. The key needs the `webhooks` scope. See [Authentication](https://docs.coderhelm.com/api/authentication).

## Parameters

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `endpoint_id` | string | yes | The endpoint's id. |
| `delivery_id` | string | yes | The delivery's id. |

## Responses

### 200

The delivery with the new attempt.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `attempts` | array of DeliveryAttempt | yes | Every attempt, oldest first (the last 20). |
| `attempts[].at` | string | yes | When it was sent. |
| `attempts[].code` | integer or null | no | The endpoint's HTTP status, when it answered. |
| `attempts[].duration_ms` | integer | yes | How long it took. |
| `attempts[].error` | string | yes | What went wrong, when it did. |
| `created_at` | string | yes | When the event was first sent to this endpoint. |
| `event` | string | yes | The event type. |
| `event_id` | string | yes | The event's id: the same `webhook-id` on every attempt. |
| `headers` | object | yes | The request's headers, the signature removed. |
| `id` | string | yes | The Deliveries record's id. |
| `next_retry_at` | string or null | no | When the next retry is due, while one is. |
| `outcome` | string | yes | What happened, in a few words. |
| `payload_preview` | string | yes | The body that was sent, with secret-looking values masked, cut at 4 KB. |
| `reason` | string | yes | A reason code when it failed. |
| `reason_fix` | string | yes | What to do about it. |
| `reason_message` | string | yes | The reason in plain words. |
| `status` | string | yes | `pending` (being retried), `handled` (delivered) or `failed`. |

Headers: `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset`.

### 401

The key is missing, malformed, revoked or expired, or the person who made it left the team.

### 403

The key lacks the scope this endpoint needs (`missing_scope`).

### 404

No such endpoint or delivery.

### 410

The event is no longer kept.

### 429

Over the key's rate limit (`rate_limited`), or, for endpoints that start work, over the team's monthly token limit (`token_limit_reached`).

Headers: `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset`, `Retry-After`.

### 500

Something failed on CoderHelm's side. Safe to retry reads.

## Example request

cURL:

```bash
curl -X POST 'https://api.coderhelm.com/api/webhooks/endpoints/ep_01jbendpt4a7b0c3d6e9f2g5h8/deliveries/01JBDLVR5T8V1W4X7Y0Z3A6B9C/resend' \
  -H "Authorization: Bearer $CODERHELM_API_KEY"
```

TypeScript:

```ts
const res = await fetch("https://api.coderhelm.com/api/webhooks/endpoints/ep_01jbendpt4a7b0c3d6e9f2g5h8/deliveries/01JBDLVR5T8V1W4X7Y0Z3A6B9C/resend", {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.CODERHELM_API_KEY}`,
  },
});
if (!res.ok) {
  const { error, code } = await res.json();
  throw new Error(`${res.status} ${code}: ${error}`);
}
const data = await res.json();
```

Python:

```python
import os
import requests

headers = {
    "Authorization": f"Bearer {os.environ['CODERHELM_API_KEY']}",
}
res = requests.request("POST", "https://api.coderhelm.com/api/webhooks/endpoints/ep_01jbendpt4a7b0c3d6e9f2g5h8/deliveries/01JBDLVR5T8V1W4X7Y0Z3A6B9C/resend", headers=headers)
if not res.ok:
    raise RuntimeError(f"{res.status_code}: {res.json().get('error')}")
data = res.json()
```

## Example response

```json
{
  "attempts": [
    {
      "at": "2026-10-26T14:31:47.901Z",
      "code": 401,
      "duration_ms": 112,
      "error": "Answered 401: bad signature"
    }
  ],
  "created_at": "2026-10-26T14:31:47.780Z",
  "event": "run.completed",
  "event_id": "evt_01JBEVNT8M1N4P7Q0R3S6T9V2W",
  "headers": {
    "webhook-id": "evt_01JBEVNT8M1N4P7Q0R3S6T9V2W",
    "webhook-signature": "[redacted]",
    "webhook-timestamp": "1792420307"
  },
  "id": "01JBDLVR5T8V1W4X7Y0Z3A6B9C",
  "next_retry_at": null,
  "outcome": "Refused (401)",
  "payload_preview": "{\n  \"id\": \"evt_01JBEVNT8M1N4P7Q0R3S6T9V2W\" …",
  "reason": "webhook_refused",
  "reason_fix": "Check that the endpoint verifies signatures with the right secret and accepts JSON, then press Resend.",
  "reason_message": "Your webhook endpoint refused the event (a 4xx answer), so it isn't retried.",
  "status": "failed"
}
```
