# List Webhook Events

> GET /webhooks/:id/events — the events sent to one webhook endpoint, newest first.

`GET /webhooks/:id/events`

Lists what SendDart sent to one webhook endpoint, newest first. One entry is one event: its `id` is the `svix-id` header your handler received, and every [retry](https://www.senddart.com/docs/webhooks/retries-and-replays) and replay of it reuses that id. `status` sums up its attempts so far.

| `status` | Meaning |
| --- | --- |
| `delivered` | At least one attempt got a `2xx` answer. |
| `retrying` | No `2xx` yet, and an automatic retry is still due. |
| `failed` | No `2xx`, and no automatic retry is left. You can still [replay](https://www.senddart.com/docs/api/webhooks-replay-event) it. |

> **Note:** Needs an API key with read access.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | The webhook id. |

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | number | No | Events per page, `1` to `100`. Default `20`. |
| `after` | string | No | An event `id` (`msg_…`). Returns the older events after it, for the next page. There is no `before`. |
| `status` | string | No | Only events with this status: `delivered`, `failed` or `retrying`. |
| `type` | string | No | Only events of this type, such as `email.bounced`. `event` is accepted as another name for it. |

**Node.js**

```js
const res = await fetch('https://www.senddart.com/api/webhooks/17/events?status=failed', {
  method: 'GET',
  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?status=failed')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
req = Net::HTTP::Get.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?status=failed');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    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.get(
    "https://www.senddart.com/api/webhooks/17/events?status=failed",
    headers={"Authorization": "Bearer mb_xxxxxxxxx"},
)
print(res.json())
```

**Go**

```go
package main

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

func main() {
    req, _ := http.NewRequest("GET", "https://www.senddart.com/api/webhooks/17/events?status=failed", 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()
        .get("https://www.senddart.com/api/webhooks/17/events?status=failed")
        .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?status=failed"))
    .header("Authorization", "Bearer mb_xxxxxxxxx")
    .header("User-Agent", "my-app/1.0")
    .method("GET", 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.Get, "https://www.senddart.com/api/webhooks/17/events?status=failed");
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 GET 'https://www.senddart.com/api/webhooks/17/events?status=failed' \
  -H 'Authorization: Bearer mb_xxxxxxxxx'
```

### Response

```json
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "object": "webhook_event",
      "id": "msg_5c1e9a0f3b7d2e84a6c1",
      "webhook_id": "17",
      "type": "email.bounced",
      "status": "failed",
      "attempts": 5,
      "response_status": 500,
      "error": null,
      "created_at": "2026-11-21T10:15:32.118Z",
      "last_attempt_at": "2026-11-21T12:51:40.006Z"
    }
  ]
}
```

`response_status` and `error` come from the latest attempt: the HTTP status your endpoint answered with, or the reason there was no answer (a timeout, a refused connection). A `limit` outside 1–100, an `after` that is not an event id, or an unknown `status` returns `422 validation_error`. A webhook that is not yours returns `404 not_found`.
