# Send a test event

`POST /v1/webhooks/{id}/test`

Requires an API key with the `webhooks:write` scope. [About keys and scopes](/docs/api/authentication)

Queues a `webhook.test` event to this endpoint, signed and retried like any other, and returns the delivery to watch.

## Path parameters

- `id` (string, required, uuid)

## Returns

Returns `202 Accepted`. Otherwise returns an error; [Errors](/docs/api/errors) lists every code and which to retry.

- `id` (string, required, uuid)
- `subscriptionId` (string, required, uuid) — The webhook (endpoint) it was sent to.
- `eventId` (string, required, uuid) — The event; the same across retries.
- `eventType` (string, required) — The event type, such as `message.delivered`.
- `attempt` (integer, required, min -9007199254740991, max 9007199254740991) — Which attempt this was, starting at 1.
- `status` (string, required, one of `pending`, `delivered`, `failed`)
- `responseStatus` (integer | null, required, min -9007199254740991, max 9007199254740991) — The HTTP status your endpoint answered with; null if it did not answer.
- `failureReason` (string | null, required) — Why the attempt failed.
- `requestBody` (string | null, required) — What was sent; kept only while a delivery is pending or failed.
- `responseBody` (string | null, required) — The first 1 KB of the endpoint's last reply.
- `createdAt` (string, required, date-time)
- `deliveredAt` (string | null, required, date-time) — When your endpoint accepted it.

## Example

```bash
curl -X POST https://api.kirora.io/v1/webhooks/018f2a4e-6b1c-7d3e-9f40-37386ae05a6b/test \
  -H "Authorization: Bearer $KIRORA_API_KEY"
```

Response `202`:

```json
{
  "data": {
    "id": "018f2a4e-6b1c-7d3e-9f40-37386ae05a6b",
    "subscriptionId": "018f2a4e-6b1c-7d3e-9f40-77e633395a6b",
    "eventId": "018f2a4e-6b1c-7d3e-9f40-8f3712f25a6b",
    "eventType": "eventType_example",
    "attempt": -9007199254740991,
    "status": "pending",
    "responseStatus": -9007199254740991,
    "failureReason": "failureReason_example",
    "requestBody": "requestBody_example",
    "responseBody": "responseBody_example",
    "createdAt": "2030-03-14T09:30:00Z",
    "deliveredAt": "2030-03-14T09:30:00Z"
  }
}
```
