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

# 智能体设置

> 在智能体工作流中使用发布集成前验证其凭证。

## 测试 Webflow 连接

```http theme={null}
POST /projects/{project_id}/agent/settings/test-webflow
```

测试 Webflow 凭证并返回这些凭证可访问的集合。此端点仅执行连接测试，不会保存凭证。

### 请求体

| 字段           | 类型            | 必填 | 说明                |
| ------------ | ------------- | -- | ----------------- |
| `project_id` | string (UUID) | 是  | 与 URL 路径中相同的项目 ID |
| `site_id`    | string        | 是  | Webflow 站点 ID     |
| `api_token`  | string        | 是  | Webflow API 令牌    |

```bash theme={null}
curl -X POST "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/agent/settings/test-webflow" \
  -H "X-API-Key: tk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "a1b2c3d4-...",
    "site_id": "65abc123...",
    "api_token": "webflow-token"
  }'
```

### 响应

```json theme={null}
{
  "success": true,
  "data": {
    "success": true,
    "error": null,
    "collections": [
      { "id": "collection-id", "title": "Blog posts" }
    ]
  }
}
```

<Warning>
  请将 Webflow 令牌视为机密信息。不要记录它，也不要将它放入智能体对话历史。
</Warning>

### 错误响应

| 状态码   | 原因                             |
| ----- | ------------------------------ |
| `400` | 缺少项目 ID、站点 ID、API 令牌，或 JSON 无效 |
| `403` | API 密钥所属团队无法访问项目               |
| `500` | Webflow 拒绝凭证或连接测试失败            |
