# Test webhook endpoint

> Sends one signed webhook.test event to the endpoint and waits for the answer. Sends no messages to contacts and does not change the endpoint health. Returns the HTTP status and the duration.

Last updated: 2026-10-25. Source: https://docs.smartchat.marketing/en/api/reference/webhooks/test_webhook_endpoint/

Sends one signed webhook.test event to the endpoint and waits for the answer. Sends no messages to contacts and does not change the endpoint health. Returns the HTTP status and the duration.

`POST /v1/webhook-endpoints/{endpoint_id}/test`

| | |
|---|---|
| Permission | `webhooks:write` ([all permissions](https://docs.smartchat.marketing/en/api/permissions/)) |
| Risk | Write (no outside effect) |
| Idempotency-Key | Not needed ([how it works](https://docs.smartchat.marketing/en/concepts/idempotency/)) |
| Safe to repeat | Not safe to repeat blindly: the server keeps no key for this call, so a repeat does the work again. |
| Rate limit class | `write` (120 requests per minute per key) |
| Confirmation | None |
| MCP tool | Not available in MCP |
| Since version | 2026-10-25 |

## What it does

- Changes data in your account. It does not send messages to contacts.
- Acts on a connected outside system.

## Request

**Path parameters**

| Name | Type | Description |
|---|---|---|
| `endpoint_id` | string | Webhook endpoint ID. |

## Examples

**curl**

```bash
curl -X POST "https://api.smartchat.marketing/v1/webhook-endpoints/whe_0f8c1a2e4b7d4c3e9a5b6d7e8f901234/test" \
  -H "Authorization: Bearer $SMARTCHAT_API_KEY"
```

**Python**

```python
import os
import requests

response = requests.post(
    "https://api.smartchat.marketing/v1/webhook-endpoints/whe_0f8c1a2e4b7d4c3e9a5b6d7e8f901234/test",
    headers={"Authorization": "Bearer " + os.environ["SMARTCHAT_API_KEY"]},
)
response.raise_for_status()
print(response.json())
```

**TypeScript**

```typescript
const response = await fetch("https://api.smartchat.marketing/v1/webhook-endpoints/whe_0f8c1a2e4b7d4c3e9a5b6d7e8f901234/test", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SMARTCHAT_API_KEY}`,
  },
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());
```

Response (200):


```json
{
  "object": "webhook_test_result",
  "endpoint_id": "whe_0f8c1a2e4b7d4c3e9a5b6d7e8f901234",
  "delivery_id": "whd_7a1b2c3d4e5f40718293a4b5c6d7e8f9",
  "delivered": true,
  "http_status": 200,
  "duration_ms": 182,
  "error": null
}
```

## Response

Status 200. Every response has the headers `Request-Id`, `SmartChat-Version` and `X-RateLimit-*`.

| Name | Type | Description |
|---|---|---|
| `object` | string | Always "webhook_test_result". always `webhook_test_result` |
| `endpoint_id` | string | Tested endpoint. |
| `delivery_id` | string | Delivery ID of the test (visible in the delivery log). |
| `delivered` | boolean | True if your server answered with a 2xx status. |
| `http_status` | integer or null | HTTP status of your server. Null if there was no answer. 0 to 599 |
| `duration_ms` | integer | Duration in milliseconds. 0 to 3600000 |
| `error` | string or null | Short reason if the test failed. up to 200 characters |

## Errors

| Code | Status | When |
|---|---|---|
| [`api_key_expired`](https://docs.smartchat.marketing/en/errors/#api_key_expired) | 401 | This API key has expired. |
| [`api_key_invalid`](https://docs.smartchat.marketing/en/errors/#api_key_invalid) | 401 | This API key is not valid. |
| [`api_key_revoked`](https://docs.smartchat.marketing/en/errors/#api_key_revoked) | 401 | This API key was revoked. |
| [`authentication_required`](https://docs.smartchat.marketing/en/errors/#authentication_required) | 401 | No API key was sent. Send 'Authorization: Bearer <key>'. |
| [`insufficient_scope`](https://docs.smartchat.marketing/en/errors/#insufficient_scope) | 403 | This key lacks a required permission. |
| [`ip_not_allowed`](https://docs.smartchat.marketing/en/errors/#ip_not_allowed) | 403 | This IP address is not allowed for this key. |
| [`endpoint_not_found`](https://docs.smartchat.marketing/en/errors/#endpoint_not_found) | 404 | No webhook endpoint with this ID exists in this account. |
| [`validation_failed`](https://docs.smartchat.marketing/en/errors/#validation_failed) | 422 | A field is not valid. |
| [`rate_limited`](https://docs.smartchat.marketing/en/errors/#rate_limited) | 429 | Too many requests. Wait and try again. |
| [`internal_error`](https://docs.smartchat.marketing/en/errors/#internal_error) | 500 | Something went wrong on our side. |

All errors use [one format](https://docs.smartchat.marketing/en/concepts/errors-overview/).
