# 用 Webhook 建立事件

Source: https://instatus.com/help/zh-tw/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"
}
```

完成了！👏
