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

# 更新鈎子

> 啓用或禁用鈎子，或更改其冷卻時間與配置。

## 路徑參數

<ParamField path="id" type="string" required>
  鈎子的 UUID。
</ParamField>

## 請求

所有字段均為可選 — 只需包含你想更改的字段。

<ParamField body="enabled" type="boolean">
  啓用或禁用該鈎子。禁用的鈎子永遠不會觸發。
</ParamField>

<ParamField body="cooldown_minutes" type="number">
  兩次觸發之間的最短間隔時間，以分鐘為單位（1–1440）。
</ParamField>

<ParamField body="config" type="object">
  特定於該鈎子的配置覆蓋項。
</ParamField>

## 響應

```json theme={null}
{ "updated": true }
```

## 身份驗證

需要具有 `completions` 權限範圍的 API 密鑰。

## 示例

<CodeGroup>
  ```bash curl theme={null}
  curl -X PATCH https://www.hitheo.ai/api/v1/hooks/HOOK_ID \
    -H "Authorization: Bearer $THEO_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{ "enabled": false }'
  ```

  ```typescript SDK theme={null}
  await theo.updateHook("HOOK_ID", { enabled: false });
  ```
</CodeGroup>


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