> ## 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.

# 驗證小組件安裝

> 對小組件的配置以及（可選的）實際頁面運行預檢檢查。

運行一系列檢查並返回結果列表。如果未提供 `domain`，則只檢查小組件自身的配置（狀態、關聯的密鑰、域名允許列表）。如果提供了 `domain`，還會抓取該頁面以確認嵌入代碼是否存在，並檢查頁面的 `Content-Security-Policy` 中是否存在會阻止該小組件運行的指令。

## 身份驗證

需要提供 Bearer 令牌（API 密鑰）或儀表盤會話。

## 路徑參數

<ParamField path="id" type="string" required>
  小組件配置的 UUID。
</ParamField>

## 請求

<ParamField body="domain" type="string">
  要檢查的頁面 URL（可選）。提供後，系統會抓取該頁面（帶有 SSRF 防護）並掃描其中的嵌入代碼片段以及 CSP 相關問題。
</ParamField>

## 響應

<ResponseField name="checks" type="array">
  每項檢查包含：`name`、`status`（`pass` | `fail` | `warn`）、`message`，以及可選的 `fix` 代碼片段（例如需要添加到你的站點中的 CSP 指令）。
</ResponseField>

## 示例

```bash curl theme={null}
curl -X POST https://www.hitheo.ai/api/v1/iframes/CONFIG_ID/verify \
  -H "Authorization: Bearer $THEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "domain": "https://example.com/contact" }'
```


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