---
title: "Test a webhook endpoint"
description: "Sends a test payload to the webhook URL, including disabled destinations. Returns `422` if the endpoint responds with an error. A successful response returns the updated webhook configuration's ETag for a subsequent enabling PUT."
canonical: https://y2.dev/docs/api/reference/webhooks/testWebhook/
---

Endpoint Reference[Webhooks](https://y2.dev/docs/api/reference/webhooks)

# Test a webhook endpoint

Sends a test payload to the webhook URL, including disabled destinations. Returns \`422\` if the endpoint responds with an error. A successful response returns the updated webhook configuration's ETag for a subsequent enabling PUT.

`POST https://api.y2.dev/api/v1/webhooks/{webhookId}/test`

- Operation ID: `testWebhook`
- Required scopes: `webhooks:manage`
- Contract: https://y2.dev/openapi.json

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `webhookId` | path | string | Yes | Stable public webhook configuration ID. |

## Responses

| Status | Description | Body |
| --- | --- | --- |
| 200 | Webhook test successful | `WebhookTestResponse` |
| 400 | Invalid request parameters |  |
| 401 | Missing or invalid API key |  |
| 403 | Insufficient permissions or access denied |  |
| 404 | Resource not found |  |
| 422 | Webhook test failed (endpoint returned error) |  |
| 429 | Rate limit exceeded (per-key or per-account aggregate) |  |
| 500 | Internal server error |  |

### 200 response fields

| Field | Type | Description |
| --- | --- | --- |
| `data` | object |  |
| `data.success` | boolean |  |
| `data.statusCode` | integer | HTTP status code from the webhook endpoint |
| `data.error` | string | Error message if the test failed |
| `data.responseTime` | integer | Response time in milliseconds |
| `meta` | object |  |
| `meta.message` | string |  |
