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