> ## Documentation Index
> Fetch the complete documentation index at: https://docs.quantumapi.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhook management

> Test, replay, and inspect webhook deliveries.

The base webhook endpoints (create, list, delete) are documented under [API Reference → Webhooks](/api-reference/endpoint/webhook). This page covers operational endpoints for testing and debugging delivery.

## Send test event

Issues a synthetic `webhook.test` event to the endpoint. The synthetic event is signed and counted toward the endpoint's delivery history.

```http theme={null}
POST /v1/webhooks/{id}/test
```

```bash theme={null}
curl -X POST https://api.qustody.io/v1/webhooks/wh_01HXYZ/test \
  -H "Authorization: Bearer $QUSTODY_API_KEY"
```

**Response 200**

```json theme={null}
{
  "delivery_id": "del_01HXYZ...",
  "status": "delivered",
  "http_status": 200,
  "duration_ms": 142,
  "attempt": 1
}
```

If your receiver returns `>= 400`, the test still counts as a delivery attempt and is retried per the configured backoff.

## Replay a delivery

Re-sends a previously emitted delivery. Useful when your receiver was down and the dead-letter window expired before it recovered.

```http theme={null}
POST /v1/webhooks/{id}/replay/{deliveryId}
```

```bash theme={null}
curl -X POST https://api.qustody.io/v1/webhooks/wh_01HXYZ/replay/del_01HXYZ \
  -H "Authorization: Bearer $QUSTODY_API_KEY"
```

The replayed payload is byte-identical to the original; the HMAC signature also matches the original. Receivers should treat replays as idempotent.

## List deliveries

```http theme={null}
GET /v1/webhooks/{id}/deliveries?status=failed&from=2026-04-27T00:00:00Z&page=1&per_page=50
```

**Filters**

| Param         | Description                            |
| ------------- | -------------------------------------- |
| `status`      | `delivered`, `failed`, `dead_lettered` |
| `event_type`  | One of the 12 event types              |
| `from` / `to` | Time range                             |

**Response 200**

```json theme={null}
{
  "deliveries": [
    {
      "id": "del_01HXYZ...",
      "endpoint_id": "wh_01HXYZ...",
      "event_type": "transaction.confirmed",
      "event_id": "evt_01HXYZ...",
      "status": "delivered",
      "http_status": 200,
      "attempt": 1,
      "duration_ms": 87,
      "next_retry_at": null,
      "delivered_at": "2026-04-27T10:15:00Z"
    }
  ]
}
```

## Required permissions

| Endpoint                                     | Permission        |
| -------------------------------------------- | ----------------- |
| `POST /v1/webhooks/{id}/test`                | `webhooks:update` |
| `POST /v1/webhooks/{id}/replay/{deliveryId}` | `webhooks:update` |
| `GET /v1/webhooks/{id}/deliveries`           | `webhooks:read`   |

## Related

* [Webhooks concept](/concepts/webhooks)
* [Webhook troubleshooting](/qustody/troubleshooting#webhooks-410-bad-signature-or-dead-letter)
