# Send a test event to a webhook endpoint

> Send a test event to a webhook endpoint: CustomDomain™ API reference in the webhooks group. Covers parameters, request body, responses and error codes.

Source: https://docs.customdomain.ai/docs/api-reference/webhooks/testWebhook

## `POST https://api.customdomain.ai/v1/webhooks/{id}:test`

Signs and sends one `webhook.test` event to this endpoint now, whatever events it subscribes to, and answers with the delivery: whether it arrived, the receiver's status code and, when it did not, the error. It tries once, with no retries, and the attempt is added to `GET /webhook-deliveries`. A delegated agent token needs `app:write`.

### Authentication

`widgetJWT`, `apiKey`, `agentToken`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

### Responses

| Status | Description |
| --- | --- |
| `200` | The test delivery |
| `401` | Error envelope: {code, title, details}. |
| `403` | Error envelope: {code, title, details}. |
| `404` | Error envelope: {code, title, details}. |

### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes |  |
| `endpoint_id` | string | no |  |
| `application_id` | string | no |  |
| `url` | string | no |  |
| `event_id` | string | no |  |
| `event_type` | string | yes |  |
| `domain` | string | no |  |
| `attempts` | integer | no |  |
| `status_code` | integer | no | HTTP status of the final attempt (0 = no response) |
| `delivered` | boolean | no |  |
| `error` | string | no |  |
| `created_at` | string | no |  |

The full specification is served at `GET https://api.customdomain.ai/v1/openapi.json`.
