> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hitheo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 測試 Webhook

> 發送一個測試事件,以驗證你的 Webhook 端點是否可訪問,以及簽名驗證是否正常工作。

## 路徑參數

<ParamField path="id" type="string" required>
  該 Webhook 的 UUID。
</ParamField>

## 行為說明

派發一個 `completion.created` 事件,其數據負載中包含 `_test: true`。此次投遞會使用與真實事件相同的 HMAC 簽名、SSRF 檢測和重試邏輯。

## 示例

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://www.hitheo.ai/api/v1/webhooks/WEBHOOK_ID/test \
    -H "Authorization: Bearer $THEO_API_KEY"
  ```

  ```typescript SDK theme={null}
  await theo.testWebhook("WEBHOOK_ID");
  ```
</CodeGroup>

### 響應

```json theme={null}
{ "sent": true }
```

### 你的服務器收到的測試事件負載

```json theme={null}
{
  "id": "evt_abc123...",
  "type": "completion.created",
  "created": "2026-04-15T12:00:00.000Z",
  "data": {
    "_test": true,
    "message": "This is a test event from Theo. If you received it, your webhook is working!"
  }
}
```

<Tip>
  可通過[投遞日誌](/api-reference/webhooks/deliveries)查看該測試事件是否投遞成功。
</Tip>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.