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

# 更新 Webhook

> 更新 Webhook 的 URL、事件類型或啓用狀態。

## 路徑參數

<ParamField path="id" type="string" required>
  該 Webhook 的 UUID。
</ParamField>

## 請求

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

<ParamField body="url" type="string">
  新的端點 URL。需通過 SSRF 校驗。
</ParamField>

<ParamField body="event_types" type="string[]">
  新的訂閱事件類型集合。
</ParamField>

<ParamField body="enabled" type="boolean">
  啓用或禁用該 Webhook。已禁用的 Webhook 會跳過投遞。
</ParamField>

<ParamField body="description" type="string">
  更新後的描述。
</ParamField>

## 示例

<CodeGroup>
  ```bash curl theme={null}
  curl -X PATCH https://www.hitheo.ai/api/v1/webhooks/WEBHOOK_ID \
    -H "Authorization: Bearer $THEO_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{ "event_types": ["*"], "enabled": true }'
  ```

  ```typescript SDK theme={null}
  await theo.updateWebhook("WEBHOOK_ID", {
    event_types: ["*"],
    enabled: true,
  });
  ```
</CodeGroup>

### 響應

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


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