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