<!-- source: https://secondlayer.tools/docs/api-reference#test-webhook -->

## Send a test delivery

`POST /api/webhooks/{id}/test` (self-hosted instances only)

Posts one sample event, built and signed in the webhook's format, to its URL through the SSRF guard, and logs it under deliveries. The body has `data.test: true`, so receivers can tell it from a live event. Works while paused. Takes no body.

### Path parameters

| Name | Type | Description |
| --- | --- | --- |
| `id` | string, required | Webhook id (UUID), as returned by create or list. |

### Returns

One `WebhookTestResult` object.

### Responses

- `200` What the target answered. A failed delivery still returns 200; check `ok`
- `400` A parameter, filter, cursor or body field was refused; `code` says which
- `401` This bind requires the instance token, and it was missing or wrong
- `404` No webhook with this id
- `415` Missing or non-JSON `Content-Type` (`UNSUPPORTED_MEDIA_TYPE`) — writes must send `Content-Type: application/json`

### Example

```bash
curl -X POST http://127.0.0.1:3800/api/webhooks/{id}/test \
  -H "Authorization: Bearer $INSTANCE_TOKEN"
```

```json
{
  "ok": true,
  "statusCode": 200,
  "error": null,
  "durationMs": 138,
  "deliveryId": "c7a0e5d2-1f4b-4e8a-9d36-0b5f2a7c9e14"
}
```
