
# View Webhook Request History

The webhook requests API provides visibility into every delivery attempt, helping you debug issues, monitor performance, and verify webhook behavior.

## List Webhook Requests

Get request history for a webhook:

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests
```

### Response

```json
{
  "limit": 20,
  "after": "req_xyz789",
  "before": null,
  "has_more": true,
  "data": [
    {
      "uuid": "req_def456",
      "webhook_uuid": "wh_abc123",
      "event_uuid": "evt_ghi789",
      "created": "2026-01-08T14:25:30Z",
      "status_code": 200,
      "response_body": "OK",
      "error_message": null
    },
    {
      "uuid": "req_jkl012",
      "webhook_uuid": "wh_abc123",
      "event_uuid": "evt_mno345",
      "created": "2026-01-08T13:10:15Z",
      "status_code": 500,
      "response_body": "Internal Server Error",
      "error_message": "Connection timeout"
    }
  ]
}
```

## Pagination

Webhook requests use cursor-based pagination:

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?after=req_xyz789&limit=50
```

### Query Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `limit` | integer | Results per page (1-100, default: 20) |
| `after` | string | Cursor for next page |
| `before` | string | Cursor for previous page |
| `order_by` | string | Sort field (e.g., `created`) |
| `order_way` | string | Sort direction (`asc` or `desc`) |
| `created_after` | integer | UTC timestamp - requests created after this time |
| `created_before` | integer | UTC timestamp - requests created before this time |
| `delivered_after` | integer | UTC timestamp - requests delivered after this time |
| `delivered_before` | integer | UTC timestamp - requests delivered before this time |
| `last_attempt_after` | integer | UTC timestamp - last delivery attempt after this time |
| `last_attempt_before` | integer | UTC timestamp - last delivery attempt before this time |
| `status_code` | integer | Filter by HTTP status code (e.g., `200`, `500`) |

## Filtering Requests

### Filter by Creation Time

Get requests based on when they were created, using UTC timestamps (seconds since epoch).

**Requests created after a specific time:**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?created_after=1767793661
```

**Requests created before a specific time:**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?created_before=1767880061
```

**Requests created within a time range:**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?created_after=1767793661&created_before=1767880061
```

### Filter by Delivery Time

Get requests based on when they were successfully delivered.

**Requests delivered after a specific time:**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?delivered_after=1767793661
```

**Requests delivered before a specific time:**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?delivered_before=1767880061
```

**Requests delivered within a time range:**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?delivered_after=1767793661&delivered_before=1767880061
```

### Filter by Last Attempt Time

Get requests based on when the last delivery attempt was made.

**Requests with last attempt after a specific time:**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?last_attempt_after=1767793661
```

**Requests with last attempt before a specific time:**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?last_attempt_before=1767880061
```

**Requests with last attempt within a time range:**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?last_attempt_after=1767793661&last_attempt_before=1767880061
```

> ℹ️ **INFO:** **UTC Timestamps**: All timestamp parameters use UTC time in seconds since epoch.

### Filter by Status Code

Get requests by HTTP response status code.

**Successful requests only (200-299):**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?status_code=200
```

**Server errors (500-599):**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?status_code=500
```

**Unauthorized requests (401):**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?status_code=401
```

**Not found errors (404):**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?status_code=404
```

**Rate limit errors (429):**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?status_code=429
```

### Sorting Options

Sort by creation timestamp.

**Sort by creation time (descending, newest first):**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?order_by=created&order_way=desc
```

**Sort by creation time (ascending, oldest first):**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?order_by=created&order_way=asc
```

### Combining Filters

Combine multiple filters to create powerful queries.

**Recent failures (last 24 hours):**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?status_code=500&created_after=1767793661&order_by=created&order_way=desc&limit=50
```

**Successful requests in a time range:**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?status_code=200&created_after=1767793661&created_before=1767880061&order_by=created&order_way=asc
```

**Latest 100 requests, sorted newest first:**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?order_by=created&order_way=desc&limit=100
```

**Recent authorization failures:**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?status_code=401&created_after=1767793661&limit=20
```

**Successfully delivered requests in last hour:**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?status_code=200&delivered_after=1767880061&order_by=created&order_way=desc
```

**Failed delivery attempts in specific period:**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?status_code=500&last_attempt_after=1767793661&last_attempt_before=1767880061&order_by=created&order_way=desc
```

**Recent retry attempts (last attempt in last 30 minutes):**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?last_attempt_after=1767878261&order_by=created&order_way=desc&limit=50
```

**Requests created but not delivered yet:**

```
GET https://api.dnsradar.dev/webhooks/wh_abc123/requests?created_after=1767793661&delivered_before=1767793661&order_by=created&order_way=desc
```

## Request Fields

| Field | Description |
|-------|-------------|
| uuid | Unique request identifier (req_) |
| webhook_uuid | Associated webhook ID |
| event_uuid | Associated event ID |
| created | ISO 8601 timestamp |
| status_code | HTTP status code from endpoint |
| response_body | Response body (truncated to 4000 chars) |
| error_message | Error description (if failed) |


## Identifying Issues

### Common Error Messages

| Error | Cause | Solution |
|-------|-------|----------|
| Connection timeout | Endpoint slow/unresponsive | Optimize response time |
| DNS resolution failed | Invalid hostname | Verify webhook URL |
| SSL certificate error | Invalid/expired cert | Update SSL certificate |
| Connection refused | Endpoint not listening | Start endpoint server |


## Next Steps

- [Understand Webhook Retries](/docs/webhook-retries)
- [Test Webhooks](/docs/test-webhooks)
- [Enable/Disable Webhooks](/docs/enable-disable-webhooks)
