# Send a Test Delivery

One signed `webhook.test` to the webhook of one environment, right now, with what happened.

## Overview

- Signed and sent like every delivery ([Events to Your Server](https://docs.aureahub.com/docs/guide-events.md)), also while the webhook is switched off. The body's `data` holds `tenantId`, `webhookId` and a `message`.
- `delivered` is `true` when your server answered `2xx` within 10 seconds. `statusCode` is your server's answer, or `null` when there was none; `error` says why the delivery couldn't be made (for example an address that doesn't resolve or isn't public), or is `null`.
- Never retried. At most **10 a minute** from one client address; more answers `429`.
- `404` with `details.code` `NOAH_WEBHOOK_NOT_FOUND` when the environment has no webhook. For an Aurea administrator, or the tenant's own administrator; written to the tenant's activity log with the outcome.

## Endpoint

### `POST /v1/admin/tenants/{id}/webhooks/{environment}/test`

Authentication: bearer token required.

Sends a signed test delivery to the environment's webhook and reports the outcome. No body.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Tenant UUID |
| `environment` | string | yes | `production` or `sandbox` |

**Responses**

`200` Delivered

```json
{
  "id": "evt_4b7e19c0d25a8f63e1b9d07c5a2f8e14",
  "type": "webhook.test",
  "delivered": true,
  "statusCode": 204,
  "error": null,
  "durationMs": 142
}
```

`200` Not delivered

```json
{
  "id": "evt_84708362734f456322930105a8f8f596",
  "type": "webhook.test",
  "delivered": false,
  "statusCode": null,
  "error": "getaddrinfo ENOTFOUND hooks.example.invalid",
  "durationMs": 1061
}
```

`429` Too many

```json
{
  "statusCode": 429,
  "error": "Error",
  "message": "Rate limit exceeded, retry in 1 minute"
}
```

---

Web version: https://docs.aureahub.com/#tenant-webhook-test
