# Replay Webhook Event

> POST /webhooks/:id/events/:event_id/replay — send one event to its endpoint again, now.

`POST /webhooks/:id/events/:event_id/replay`

Sends an event to its endpoint once more, right away, with the original payload and the same `svix-id`, freshly signed. Handy once you have fixed a handler that failed. The replay is a single try: if it fails, SendDart does not retry it on its own.

Because the `svix-id` does not change, a handler that drops duplicates by that id (see [How to store webhooks data](https://www.senddart.com/docs/webhooks/store-data)) ignores a replay of an event it already processed.

> **Note:** Needs a full-access API key. A sending-only key gets `401 restricted_api_key`.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | The webhook id. |
| `event_id` | string | Yes | The event id (`msg_…`). |

**Node.js**

```js
const res = await fetch('https://www.senddart.com/api/webhooks/17/events/msg_5c1e9a0f3b7d2e84a6c1/replay', {
  method: 'POST',
  headers: { 'Authorization': 'Bearer mb_xxxxxxxxx' },
});
const data = await res.json();
console.log(data);
```

**Ruby**

```ruby
require 'net/http'
require 'uri'

uri = URI('https://www.senddart.com/api/webhooks/17/events/msg_5c1e9a0f3b7d2e84a6c1/replay')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
req = Net::HTTP::Post.new(uri)
req['Authorization'] = 'Bearer mb_xxxxxxxxx'
res = http.request(req)
puts res.body
```

**PHP**

```php
<?php
$ch = curl_init('https://www.senddart.com/api/webhooks/17/events/msg_5c1e9a0f3b7d2e84a6c1/replay');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer mb_xxxxxxxxx',
        'User-Agent: my-app/1.0',
    ],
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
```

**Python**

```python
import requests

res = requests.post(
    "https://www.senddart.com/api/webhooks/17/events/msg_5c1e9a0f3b7d2e84a6c1/replay",
    headers={"Authorization": "Bearer mb_xxxxxxxxx"},
)
print(res.json())
```

**Go**

```go
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("POST", "https://www.senddart.com/api/webhooks/17/events/msg_5c1e9a0f3b7d2e84a6c1/replay", nil)
    req.Header.Set("Authorization", "Bearer mb_xxxxxxxxx")
    res, _ := http.DefaultClient.Do(req)
    defer res.Body.Close()
    out, _ := io.ReadAll(res.Body)
    fmt.Println(string(out))
}
```

**Rust**

```rust
use reqwest::Client;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let res = Client::new()
        .post("https://www.senddart.com/api/webhooks/17/events/msg_5c1e9a0f3b7d2e84a6c1/replay")
        .header("Authorization", "Bearer mb_xxxxxxxxx")
        .header("User-Agent", "my-app/1.0")
        .send()
        .await?;
    println!("{}", res.text().await?);
    Ok(())
}
```

**Java**

```java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

var client = HttpClient.newHttpClient();
var request = HttpRequest.newBuilder()
    .uri(URI.create("https://www.senddart.com/api/webhooks/17/events/msg_5c1e9a0f3b7d2e84a6c1/replay"))
    .header("Authorization", "Bearer mb_xxxxxxxxx")
    .header("User-Agent", "my-app/1.0")
    .method("POST", HttpRequest.BodyPublishers.noBody())
    .build();
var response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

**.NET**

```csharp
using System.Net.Http;
using System.Text;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://www.senddart.com/api/webhooks/17/events/msg_5c1e9a0f3b7d2e84a6c1/replay");
request.Headers.Add("Authorization", "Bearer mb_xxxxxxxxx");
request.Headers.Add("User-Agent", "my-app/1.0");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
```

**cURL**

```bash
curl -X POST 'https://www.senddart.com/api/webhooks/17/events/msg_5c1e9a0f3b7d2e84a6c1/replay' \
  -H 'Authorization: Bearer mb_xxxxxxxxx'
```

### Response

The new attempt, and the event as it stands after it.

```json
{
  "object": "webhook_event_replay",
  "id": "msg_5c1e9a0f3b7d2e84a6c1",
  "attempt": {
    "object": "webhook_event_attempt",
    "id": "90533",
    "event_id": "msg_5c1e9a0f3b7d2e84a6c1",
    "attempt": 6,
    "status": "succeeded",
    "response_status": 200,
    "error": null,
    "created_at": "2026-11-21T14:02:10.551Z"
  },
  "event": {
    "object": "webhook_event",
    "id": "msg_5c1e9a0f3b7d2e84a6c1",
    "webhook_id": "17",
    "type": "email.bounced",
    "status": "delivered",
    "attempts": 6,
    "response_status": 200,
    "error": null,
    "created_at": "2026-11-21T10:15:32.118Z",
    "last_attempt_at": "2026-11-21T14:02:10.551Z",
    "payload": { "type": "email.bounced", "created_at": "2026-11-21T10:15:32.118Z", "data": { "email_id": "4ef9a417-02e9-4d39-ad75-9611e0fcc33c" } }
  }
}
```

### When a replay is refused

| Error | Why |
| --- | --- |
| `404 not_found` | No such webhook or event on your account. |
| `422 validation_error` | The endpoint is disabled (enable it first), the endpoint no longer subscribes to this event type (add the type back first), or the event was a test delivery (send a new test instead). |
