# Replay one delivery with the same webhook-id and an identical body

URL: https://neattrim.com/docs/api/replay-webhook-delivery

POST /v1/webhook-endpoints/{id}/deliveries/{delivery_id}/replay: Replay one delivery with the same webhook-id and an identical body.

Endpoint: `POST /v1/webhook-endpoints/{id}/deliveries/{delivery_id}/replay`

Who can call it: An API key, or an OAuth token for an app.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |
| `delivery_id` | path | string | yes |  |

## Examples

Set NEATTRIM_API_KEY to your key, then copy an example. A tool that draws from your allowance reads an uploaded file: upload a sample file as in the quickstart and set VIDEO_FILE_ID (or AUDIO_FILE_ID, IMAGE_FILE_ID, SUBTITLES_FILE_ID) to its file_id. Any other id in an example, such as JOB_ID, is read from a variable of the same name.

### curl

```bash
curl -X POST "https://api.neattrim.com/v1/webhook-endpoints/$WEBHOOK_ENDPOINT_ID/deliveries/$DELIVERY_ID/replay" \
  -H "Authorization: Bearer $NEATTRIM_API_KEY"
```

### TypeScript

```ts
// @neattrim/sdk is not on npm yet: it arrives with the first client release. Use the curl example today.
import { api, Neattrim, unwrap } from "@neattrim/sdk";

const client = new Neattrim({ apiKey: process.env.NEATTRIM_API_KEY });
const result = unwrap(
  await api.replayWebhookDelivery({
    client: client.client,
    path: { id: process.env.WEBHOOK_ENDPOINT_ID ?? "", delivery_id: process.env.DELIVERY_ID ?? "" },
  }),
);
console.log(result);
```

### Python

```python
# neattrim is not on PyPI yet: it arrives with the first client release. Use the curl example today.
import os

from neattrim import Neattrim
from neattrim_generated.api.webhooks import replay_webhook_delivery

with Neattrim(api_key=os.environ["NEATTRIM_API_KEY"], base_url="https://api.neattrim.com") as client:
    result = replay_webhook_delivery.sync(os.environ["WEBHOOK_ENDPOINT_ID"], os.environ["DELIVERY_ID"], client=client.client)
    print(result)
```

## Response 202

Queued

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | no |  |
| `event` | string | no |  |
| `attempt` | integer | no |  |
| `status_code` | integer or null | no |  |
| `delivered_at` | string or null | no |  |

## Errors

- `401`: UNAUTHENTICATED or INACTIVE
- `404`: NOT_FOUND (also for other accounts' ids)
- `429`: RATE_LIMITED
