# Webhook 转事件

Source: https://instatus.com/help/zh/integrations/custom-service-webhook

1. 前往 [Instatus](https://instatus.com)，在集成中选择 Webhook to Incident
2. 复制你页面的 webhook URL

3. 如果你想新开一个事件，向该 URL 发送带以下请求体的 POST 请求，并以 JSON 编码，带上 `Content-Type: application/json` 请求头，同时记得带上模板。

```json
{
  "trigger": "down",
  "createTemplate": "cl8hrdsdsasu232441sv26yq",
  "status": "PARTIALOUTAGE"
}
```

status 是可选的

4. 如果你想解决一个事件，向该 URL 发送带以下请求体的 POST 请求

```json
{
  "trigger": "up",
  "resolveTemplate": "cl8hrdsdsasu232342441sv26yq"
}
```

搞定！👏
