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

# 列出 Hooks

> 列出所有已安装的 hooks 以及可用的 hook 预设。

## 响应

<ResponseField name="hooks" type="array">
  已安装 hooks 的数组。每项包含 `id`、`event_pattern`、`skill_slug`、`enabled`、`cooldown_minutes`、`consecutive_failures`、`last_fired_at`、`created_at`。
</ResponseField>

<ResponseField name="presets" type="array">
  可用 hook 预设的数组。每项包含 `id`、`event_pattern`、`default_skill`、`description`。
</ResponseField>

## 身份验证

需要具有 `completions` 权限范围的 API 密钥。

## 示例

```bash curl theme={null}
curl https://www.hitheo.ai/api/v1/hooks \
  -H "Authorization: Bearer $THEO_API_KEY"
```

### 响应

```json theme={null}
{
  "hooks": [
    {
      "id": "a1b2c3d4-...",
      "event_pattern": "order.*.completed",
      "skill_slug": "order-processor",
      "enabled": true,
      "cooldown_minutes": 5,
      "consecutive_failures": 0,
      "last_fired_at": null,
      "created_at": "2026-04-15T12:00:00.000Z"
    }
  ],
  "presets": [
    {
      "id": "share.accepted.welcome",
      "event_pattern": "share.accepted",
      "default_skill": "email-drafter",
      "description": "Welcome on share accept"
    }
  ]
}
```

## 管理

* `PATCH /api/v1/hooks/{id}` — 更新配置、启用/禁用
* `DELETE /api/v1/hooks/{id}` — 移除
* `GET /api/v1/hooks/{id}` — 查看执行历史


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