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