# Send a signed `webhook.test` delivery now.

> Waits for the endpoint (up to 10 seconds) and answers the delivery with its outcome.
> https://koi.dog/docs/api/webhooks/test-webhook/

`POST /api/v1/webhooks/{id}/test` · Scope: `config`

It is not retried and does not count toward disabling. No query parameters, and no body.

## Path parameters.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | The webhook endpoint's id. |

## Headers.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | `string` | no | Makes a retry safe: the same key with the same request returns the first answer and does nothing else. |

## Response.

200 OK: a `WebhookDelivery`. The example has placeholder values.

## Request.

```sh
curl -X POST "https://app.koi.dog/api/v1/webhooks/$ID/test" \
    -H "Authorization: Bearer $KOIDOG_API_KEY" \
    -H "Idempotency-Key: $(uuidgen)"
```

```js
const res = await fetch(`https://app.koi.dog/api/v1/webhooks/${process.env.ID}/test`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.KOIDOG_API_KEY}`,
    "Idempotency-Key": crypto.randomUUID(),
  },
});
console.log(await res.json());
```

```python
import os
import uuid

import requests

r = requests.post(
    f"https://app.koi.dog/api/v1/webhooks/{os.environ['ID']}/test",
    headers={
        "Authorization": f"Bearer {os.environ['KOIDOG_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
)
r.raise_for_status()
print(r.json())
```

## Response example.

```json
{
  "id": "string",
  "webhookId": "string",
  "type": "string",
  "eventSeq": 0,
  "state": "pending",
  "attempts": 0,
  "nextAttemptAt": "string",
  "attemptLog": [],
  "payload": {
    "id": "string",
    "type": "string",
    "createdAt": "string",
    "apiVersion": "v1",
    "webhookId": "string",
    "event": { … }
  },
  "createdAt": "string",
  "completedAt": "string"
}
```
