> For a complete page index of the Captain API documentation, fetch https://docs.captain.dev/llms.txt?excludeSpec=true

# Resend Delivery

POST https://api.captain.dev/v2/webhooks/endpoints/{endpoint_id}/deliveries/{message_id}/resend

Send one message to one endpoint again. The request has the same `webhook-id` header and body as the original, so a receiver that deduplicates on `webhook-id` treats it as the same event.

`message_id` is the delivery's `message_id`, or the event's `id` (`evt_` followed by the job id).

Reference: https://docs.captain.dev/reference/webhooks/deliveries/resend

## Request

### Path parameters

- `endpoint_id` (string, required) — The endpoint's id (`whe_...`).
- `message_id` (string, required) — The delivery's `message_id`, or the event's `id` (`evt_` followed by the job id).

## Response

### 202

Successful Response

- `endpoint_id` (string, required)
- `message_id` (string, required) — The id as given in the path.
- `resent` (boolean, required)

## Errors

### 401 Unauthorized Error

Missing or invalid API key.

- `error` (string, required) — Error kind. `HTTP_ERROR` for errors raised by the route.
- `message` (string, required) — What went wrong.
- `path` (string, required) — The request path.
- `status_code` (integer, optional) — The HTTP status code.

### 403 Forbidden Error

The connection is read-only and cannot change webhooks (MCP connections without write access).

- `error` (string, required) — Error kind. `HTTP_ERROR` for errors raised by the route.
- `message` (string, required) — What went wrong.
- `path` (string, required) — The request path.
- `status_code` (integer, optional) — The HTTP status code.

### 404 Not Found Error

`Webhook endpoint not found.` The id does not exist, or belongs to another organization.

- `error` (string, required) — Error kind. `HTTP_ERROR` for errors raised by the route.
- `message` (string, required) — What went wrong.
- `path` (string, required) — The request path.
- `status_code` (integer, optional) — The HTTP status code.

### 429 Too Many Requests Error

`Too many webhook management requests. Try again shortly.` Retry after the `Retry-After` header.

- `error` (string, required) — Error kind. `HTTP_ERROR` for errors raised by the route.
- `message` (string, required) — What went wrong.
- `path` (string, required) — The request path.
- `status_code` (integer, optional) — The HTTP status code.

### 503 Service Unavailable Error

Webhooks are temporarily unavailable. Retry shortly.

- `error` (string, required) — Error kind. `HTTP_ERROR` for errors raised by the route.
- `message` (string, required) — What went wrong.
- `path` (string, required) — The request path.
- `status_code` (integer, optional) — The HTTP status code.

## Examples

**Response**

```json
{
  "endpoint_id": "whe_3f9a1c7e5b2d4a6c8e0f1a2b",
  "message_id": "msg_2mXq8vTn4bK9cR1sZp7Lw3YhJd",
  "resent": true
}
```

**SDK Code**

```python Python
import requests

BASE_URL = "https://api.captain.dev"
API_KEY = "your_api_key"
ENDPOINT_ID = "whe_3f9a1c7e5b2d4a6c8e0f1a2b"
MESSAGE_ID = "msg_2mXq8vTn4bK9cR1sZp7Lw3YhJd"

response = requests.post(
    f"{BASE_URL}/v2/webhooks/endpoints/{ENDPOINT_ID}/deliveries/{MESSAGE_ID}/resend",
    headers={"Authorization": f"Bearer {API_KEY}"},
    timeout=30.0,
)
response.raise_for_status()
data = response.json()
print(f"Resent {data['message_id']}: {data['resent']}")

```

```typescript TypeScript
const BASE_URL = "https://api.captain.dev";
const API_KEY = "your_api_key";
const ENDPOINT_ID = "whe_3f9a1c7e5b2d4a6c8e0f1a2b";
const MESSAGE_ID = "msg_2mXq8vTn4bK9cR1sZp7Lw3YhJd";

const response = await fetch(`${BASE_URL}/v2/webhooks/endpoints/${ENDPOINT_ID}/deliveries/${MESSAGE_ID}/resend`, {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${API_KEY}`,
  },
});
if (!response.ok) throw new Error(`Request failed: ${response.status} ${await response.text()}`);
const data = await response.json();
console.log(`Resent ${data.message_id}: ${data.resent}`);

```